]> diplodocus.org Git - nmh/blobdiff - test/mhpath/test-mhpath
Fixed a few very minor issues that cppcheck noticed.
[nmh] / test / mhpath / test-mhpath
index 84f14e2b08c65945596cd6d5913410524009d91e..a4b621b787926198e87098e002fccbb72aee3f7f 100755 (executable)
@@ -27,20 +27,16 @@ Usage: mhpath [+folder] [msgs] [switches]
   -version
   -help
 EOF
-# The exit status is 1 with -help, so temporarily disable -e.
-set +e
-mhpath -help > $actual 2>&1
-set -e
+
+run_prog mhpath -help > $actual 2>&1
 check $expected $actual
 
-# check -version, which returns non-zero exit status
-set +e
+# check -version
 case `mhpath -v` in
   mhpath\ --*) ;;
   *          ) echo "$0: mhpath -v generated unexpected output" 1>&2
                failed=`expr ${failed:-0} + 1`;;
 esac
-set -e
 
 # check +
 run_test "mhpath +" "$MH_TEST_DIR/Mail"
@@ -65,7 +61,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
@@ -85,7 +81,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
@@ -97,7 +93,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
@@ -128,7 +124,7 @@ 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
@@ -136,7 +132,7 @@ 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