]> diplodocus.org Git - nmh/blobdiff - test/mhpath/test-mhpath
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / test / mhpath / test-mhpath
index a9aeee1ac8874d51cb0d6f37e5a458c7ae1396ca..b92e85e5ce37dcddf69d3f091c7b7787dfaa4678 100755 (executable)
@@ -28,8 +28,9 @@ Usage: mhpath [+folder] [msgs] [switches]
   -help
 EOF
 
   -help
 EOF
 
-mhpath -help > $actual 2>&1
-check $expected $actual
+#### Skip nmh intro text.
+run_prog mhpath -help | sed '/^$/,$d' >"$actual" 2>&1
+check "$expected" "$actual"
 
 # check -version
 case `mhpath -v` in
 
 # check -version
 case `mhpath -v` in
@@ -61,7 +62,7 @@ $MH_TEST_DIR/Mail/inbox/8
 $MH_TEST_DIR/Mail/inbox/9
 $MH_TEST_DIR/Mail/inbox/10
 EOF
 $MH_TEST_DIR/Mail/inbox/9
 $MH_TEST_DIR/Mail/inbox/10
 EOF
-mhpath all > $actual 2>&1
+run_prog mhpath all > $actual 2>&1
 check $expected $actual
 
 # check message number greater than highest
 check $expected $actual
 
 # check message number greater than highest
@@ -81,7 +82,7 @@ $MH_TEST_DIR/Mail/inbox/8
 $MH_TEST_DIR/Mail/inbox/9
 $MH_TEST_DIR/Mail/inbox/10
 EOF
 $MH_TEST_DIR/Mail/inbox/9
 $MH_TEST_DIR/Mail/inbox/10
 EOF
-mhpath 1-99999 > $actual 2>&1
+run_prog mhpath 1-99999 > $actual 2>&1
 check $expected $actual
 
 # check new
 check $expected $actual
 
 # check new
@@ -93,7 +94,7 @@ $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/10
 $MH_TEST_DIR/Mail/inbox/11
 EOF
 $MH_TEST_DIR/Mail/inbox/10
 $MH_TEST_DIR/Mail/inbox/11
 EOF
-mhpath first last new > $actual 2>&1
+run_prog mhpath first last new > $actual 2>&1
 check $expected $actual
 
 # check invalid message list using names
 check $expected $actual
 
 # check invalid message list using names
@@ -124,15 +125,15 @@ cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/3
 $MH_TEST_DIR/Mail/inbox/4
 EOF
 $MH_TEST_DIR/Mail/inbox/3
 $MH_TEST_DIR/Mail/inbox/4
 EOF
-mhpath first:2 > $actual 2>&1
+run_prog mhpath first:2 > $actual 2>&1
 check $expected $actual
 
 check $expected $actual
 
-# check reference to non-existant messages
+# check reference to non-existent messages
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/2
 EOF
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/2
 EOF
-mhpath 1 2 > $actual 2>&1
+run_prog mhpath 1 2 > $actual 2>&1
 check $expected $actual
 
 
 check $expected $actual