]> diplodocus.org Git - nmh/blobdiff - test/mhl/test-mhl-flags
expect this commit to be force-replaced periodically
[nmh] / test / mhl / test-mhl-flags
index 2f10b86835fe3c22817e9e173e16913598d70324..cf138872969a4eceb49a363ab4c83cb5941e33ad 100755 (executable)
@@ -13,6 +13,36 @@ fi
 
 setup_test
 mhl="${MH_LIBEXEC_DIR}/mhl"
+
+MHLDEBUG=foo check_exit '-eq 1' "$mhl" -
+unset MHLDEBUG
+check_exit '-eq 1' "$mhl" -xyzzy
+check_exit '-eq 0' "$mhl" -help
+check_exit '-eq 0' "$mhl" -version
+check_exit '-eq 1' "$mhl" -bell -nobell -clear -
+check_exit '-eq 1' "$mhl" -folder
+check_exit '-eq 1' "$mhl" -folder + -
+check_exit '-eq 1' "$mhl" -form
+check_exit '-eq 1' "$mhl" -sleep
+check_exit '-eq 1' "$mhl" -sleep 42 -
+check_exit '-eq 1' "$mhl" -moreproc foo -moreproc
+check_exit '-eq 1' "$mhl" -nofmtproc -fmtproc foo -fmtproc
+check_exit '-eq 1' "$mhl" -length 42 -length
+check_exit '-eq 1' "$mhl" -length 0
+check_exit '-eq 1' "$mhl" -width
+check_exit '-eq 1' "$mhl" -digest foo -width 0
+check_exit '-eq 1' "$mhl" -issue 42 -digest
+check_exit '-eq 1' "$mhl" -issue
+check_exit '-eq 1' "$mhl" -volume 42 -issue 0
+check_exit '-eq 1' "$mhl" -volume
+check_exit '-eq 1' "$mhl" -forwall -volume 0
+check_exit '-eq 0' "$mhl" -dashstuffing -nodashstuffing \
+    -forwall </dev/null
+check_exit '-eq 0' "$mhl" -forwall -digest foo \
+    -bell -length 1 -width 1 </dev/null
+check_exit '-eq 0' "$mhl" -forwall -digest foo \
+    -nobell -volume 1 -clear </dev/null
+
 expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
 
@@ -31,6 +61,7 @@ EOF
 
 
 # check nortrim (default), and that trailing whitespace in a
+start_test "nortrim (default), and that trailing whitespace in a"
 # component is trimmed when filtering blank lines
 cat >"$expected" <<EOF
 > There are two blank lines below.  And there is a trailing space: 
@@ -48,6 +79,7 @@ check "$expected" "$actual"
 
 
 # check rtrim
+start_test "rtrim"
 cat >"$expected" <<EOF
 > There are two blank lines below.  And there is a trailing space:
 > And another trailing space:
@@ -65,4 +97,5 @@ check "$expected" "$actual"
 
 rm -f "$MH_TEST_DIR/test.format"
 
+finish_test
 exit $failed