]> diplodocus.org Git - nmh/blobdiff - test/mhpath/test-mhpath
sbr/lock_file.c: Move static variables into their functions.
[nmh] / test / mhpath / test-mhpath
index a9aeee1ac8874d51cb0d6f37e5a458c7ae1396ca..e7209ce3865da2e8daa4ddec775bcead06854ea9 100755 (executable)
@@ -16,6 +16,8 @@ fi
 
 setup_test
 
+check_exit '-eq 1' mhpath -
+
 expected=$MH_TEST_DIR/$$.expected
 actual=$MH_TEST_DIR/$$.actual
 
@@ -28,8 +30,9 @@ Usage: mhpath [+folder] [msgs] [switches]
   -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
@@ -61,7 +64,7 @@ $MH_TEST_DIR/Mail/inbox/8
 $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
@@ -81,7 +84,7 @@ $MH_TEST_DIR/Mail/inbox/8
 $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
@@ -93,7 +96,7 @@ $MH_TEST_DIR/Mail/inbox/1
 $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
@@ -124,15 +127,15 @@ cat > $expected <<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 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
-mhpath 1 2 > $actual 2>&1
+run_prog mhpath 1 2 > $actual 2>&1
 check $expected $actual