]> diplodocus.org Git - nmh/commitdiff
Added start_test/finish_test to a bunch of tests.
authorDavid Levine <levinedl@acm.org>
Mon, 25 May 2020 18:19:35 +0000 (14:19 -0400)
committerDavid Levine <levinedl@acm.org>
Mon, 25 May 2020 18:19:35 +0000 (14:19 -0400)
30 files changed:
test/ali/test-ali
test/anno/test-anno
test/folder/test-packf
test/folder/test-sortm
test/format/test-dp
test/format/test-fmtdump
test/format/test-functions
test/format/test-mymbox
test/inc/test-inc-scanout
test/inc/test-msgchk
test/inc/test-pop
test/install-mh/test-install-mh
test/mhbuild/test-attach
test/mhbuild/test-forw
test/mhl/test-mhl-flags
test/mhmail/test-mhmail
test/mhpath/test-mhpath
test/mhshow/test-msg-buffer-boundaries
test/mhshow/test-textcharset
test/mkstemp/test-mkstemp
test/post/test-messageid
test/post/test-post-aliases
test/post/test-sendfiles
test/prompter/test-prompter
test/rcv/test-rcvpack
test/rcv/test-rcvstore
test/rcv/test-rcvtty
test/refile/test-refile
test/slocal/test-slocal
test/whom/test-whom

index dad6c7007d87067877bc6c8a78bbefdab651488d..982cff789e6d8e941689b290fc1eb5abb7cf64ec 100755 (executable)
@@ -33,6 +33,7 @@ actual_err=$MH_TEST_DIR/$$.actual_err
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >$expected <<EOF
 Usage: ali [switches] aliases ...
   switches are:
 cat >$expected <<EOF
 Usage: ali [switches] aliases ...
   switches are:
@@ -49,6 +50,7 @@ ali -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `ali -v` in
   ali\ --*) ;;
   *       ) echo "$0: ali -v generated unexpected output" 1>&2
 case `ali -v` in
   ali\ --*) ;;
   *       ) echo "$0: ali -v generated unexpected output" 1>&2
@@ -56,12 +58,15 @@ case `ali -v` in
 esac
 
 # check unknown option
 esac
 
 # check unknown option
+start_test "unknown option"
 run_test 'ali -nonexistent' 'ali: -nonexistent unknown'
 
 # check with no arguments and no AliasFile profile component
 run_test 'ali -nonexistent' 'ali: -nonexistent unknown'
 
 # check with no arguments and no AliasFile profile component
+start_test "with no arguments and no AliasFile profile component"
 run_test 'ali' ''
 
 # check with nonexistent alias file
 run_test 'ali' ''
 
 # check with nonexistent alias file
+start_test "with nonexistent alias file"
 run_test 'ali -alias nonexistent' \
          "ali: aliasing error in nonexistent - unable to read 'nonexistent'"
 
 run_test 'ali -alias nonexistent' \
          "ali: aliasing error in nonexistent - unable to read 'nonexistent'"
 
@@ -74,6 +79,7 @@ neil: neil@example.com
 EOF
 
 # check -alias
 EOF
 
 # check -alias
+start_test "-alias"
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases" \
          'me: me@example.com
 rush: geddy@example.com, alex@example.com, neil@example.com
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases" \
          'me: me@example.com
 rush: geddy@example.com, alex@example.com, neil@example.com
@@ -82,14 +88,17 @@ alex: alex@example.com
 neil: neil@example.com'
 
 # check for a specific alias
 neil: neil@example.com'
 
 # check for a specific alias
+start_test "for a specific alias"
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases rush" \
          'geddy@example.com, alex@example.com, neil@example.com'
 
 # check for a specific alias that doesn't exist
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases rush" \
          'geddy@example.com, alex@example.com, neil@example.com'
 
 # check for a specific alias that doesn't exist
+start_test "for a specific alias that doesn't exist"
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases nonexistent" \
          'nonexistent'
 
 # check -list
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases nonexistent" \
          'nonexistent'
 
 # check -list
+start_test "-list"
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases -list" \
          'me: me@example.com
 rush: geddy@example.com
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases -list" \
          'me: me@example.com
 rush: geddy@example.com
@@ -100,6 +109,7 @@ alex: alex@example.com
 neil: neil@example.com'
 
 # check -nolist, which is the default
 neil: neil@example.com'
 
 # check -nolist, which is the default
+start_test "-nolist, which is the default"
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases -list -nolist" \
          'me: me@example.com
 rush: geddy@example.com, alex@example.com, neil@example.com
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases -list -nolist" \
          'me: me@example.com
 rush: geddy@example.com, alex@example.com, neil@example.com
@@ -108,15 +118,18 @@ alex: alex@example.com
 neil: neil@example.com'
 
 # check -user
 neil: neil@example.com'
 
 # check -user
+start_test "-user"
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases -user geddy@example.com" \
          'rush, geddy'
 
 # check -nouser
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases -user geddy@example.com" \
          'rush, geddy'
 
 # check -nouser
+start_test "-nouser"
 run_test \
   "ali -alias ${MH_TEST_DIR}/Mail/aliases -user -nouser geddy@example.com" \
   'geddy@example.com'
 
 # check expansion of first address of blind list [Bug #15604]
 run_test \
   "ali -alias ${MH_TEST_DIR}/Mail/aliases -user -nouser geddy@example.com" \
   'geddy@example.com'
 
 # check expansion of first address of blind list [Bug #15604]
+start_test "expansion of first address of blind list [Bug #15604]"
 cat >"${MH_TEST_DIR}/Mail/aliases" <<EOF
 rush: Rush: geddy, alex, neil
 geddy: geddy@example.com
 cat >"${MH_TEST_DIR}/Mail/aliases" <<EOF
 rush: Rush: geddy, alex, neil
 geddy: geddy@example.com
@@ -128,6 +141,7 @@ run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases rush" \
          'Rush: geddy@example.com, alex@example.com, neil@example.com'
 
 # check that aliases followed by ; are not expanded [Bug #15604]
          'Rush: geddy@example.com, alex@example.com, neil@example.com'
 
 # check that aliases followed by ; are not expanded [Bug #15604]
+start_test "that aliases followed by ; are not expanded [Bug #15604]"
 cat >"${MH_TEST_DIR}/Mail/aliases" <<EOF
 rush: Rush: geddy, alex, neil;
 geddy: geddy@example.com
 cat >"${MH_TEST_DIR}/Mail/aliases" <<EOF
 rush: Rush: geddy, alex, neil;
 geddy: geddy@example.com
@@ -138,5 +152,5 @@ EOF
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases rush" \
          'Rush: geddy@example.com, alex@example.com, neil;'
 
 run_test "ali -alias ${MH_TEST_DIR}/Mail/aliases rush" \
          'Rush: geddy@example.com, alex@example.com, neil;'
 
-
+finish_test
 exit $failed
 exit $failed
index 008c34192a74492e615b08d3e5f9e78da4d637ba..7216327c8f2c002002a7ba851c436871f1aa08fd 100755 (executable)
@@ -41,6 +41,7 @@ actual=$MH_TEST_DIR/$$.actual
 actual_err=$MH_TEST_DIR/$$.actual_err
 
 # check -help
 actual_err=$MH_TEST_DIR/$$.actual_err
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: anno [+folder] [msgs] [switches]
   switches are:
 cat >"$expected" <<EOF
 Usage: anno [+folder] [msgs] [switches]
   switches are:
@@ -63,6 +64,7 @@ run_prog anno -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `anno -v` in
   anno\ --*) ;;
   *        ) printf '%s: anno -v generated unexpected output\n' "$0" >&2
 case `anno -v` in
   anno\ --*) ;;
   *        ) printf '%s: anno -v generated unexpected output\n' "$0" >&2
@@ -70,11 +72,13 @@ case `anno -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test "anno -nonexistent" 'anno: -nonexistent unknown'
 
 cat "${MH_TEST_DIR}/Mail/inbox/1" >"${MH_TEST_DIR}/Mail/inbox/11"
 
 # check with no switches
 run_test "anno -nonexistent" 'anno: -nonexistent unknown'
 
 cat "${MH_TEST_DIR}/Mail/inbox/1" >"${MH_TEST_DIR}/Mail/inbox/11"
 
 # check with no switches
+start_test "with no switches"
 printf 'Nmh-test:\n' >"$expected"
 cat "${MH_TEST_DIR}/Mail/inbox/1" >>"$expected"
 folder -fast 1 >/dev/null
 printf 'Nmh-test:\n' >"$expected"
 cat "${MH_TEST_DIR}/Mail/inbox/1" >>"$expected"
 folder -fast 1 >/dev/null
@@ -85,18 +89,21 @@ check "$expected" "$actual" 'keep first'
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -component
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -component
+start_test "-component"
 run_prog anno -component Nmh-test
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual"
 check "$expected" "$actual" 'keep first'
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check +folder
 run_prog anno -component Nmh-test
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual"
 check "$expected" "$actual" 'keep first'
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check +folder
+start_test "+folder"
 run_prog anno -component Nmh-test +inbox
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual"
 check "$expected" "$actual" 'keep first'
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check msg
 run_prog anno -component Nmh-test +inbox
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual"
 check "$expected" "$actual" 'keep first'
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check msg
+start_test "msg"
 folder -fast 2 >/dev/null
 run_prog anno 1 -component Nmh-test
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual"
 folder -fast 2 >/dev/null
 run_prog anno 1 -component Nmh-test
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual"
@@ -106,6 +113,7 @@ cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 check_for_hard_links
 if [ $hard_links_supported -eq 1 ]; then
   # check -noinplace
 check_for_hard_links
 if [ $hard_links_supported -eq 1 ]; then
   # check -noinplace
+  start_test "-noinplace"
   # Hard link the message and verify that the new one doesn't get annotated.
   cp "${MH_TEST_DIR}/Mail/inbox/8" "${MH_TEST_DIR}/Mail/inbox/8.copy"
   ln "${MH_TEST_DIR}/Mail/inbox/8" "${MH_TEST_DIR}/Mail/inbox/8.link"
   # Hard link the message and verify that the new one doesn't get annotated.
   cp "${MH_TEST_DIR}/Mail/inbox/8" "${MH_TEST_DIR}/Mail/inbox/8.copy"
   ln "${MH_TEST_DIR}/Mail/inbox/8" "${MH_TEST_DIR}/Mail/inbox/8.link"
@@ -115,6 +123,7 @@ if [ $hard_links_supported -eq 1 ]; then
     'keep first'
 
   # check -inplace
     'keep first'
 
   # check -inplace
+  start_test "-inplace"
   # Hard link the message and verify that the new one does get annotated.
   ln "${MH_TEST_DIR}/Mail/inbox/8" "${MH_TEST_DIR}/Mail/inbox/8.link"
   run_prog anno 8 -component Nmh-test -noinplace -inplace
   # Hard link the message and verify that the new one does get annotated.
   ln "${MH_TEST_DIR}/Mail/inbox/8" "${MH_TEST_DIR}/Mail/inbox/8.link"
   run_prog anno 8 -component Nmh-test -noinplace -inplace
@@ -122,6 +131,7 @@ if [ $hard_links_supported -eq 1 ]; then
 fi
 
 # check -nodate.  Without -text, it doesn't change the message.
 fi
 
 # check -nodate.  Without -text, it doesn't change the message.
+start_test "-nodate.  Without -text, it doesn't change the message."
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "$expected-nodate"
 run_prog anno 1 -component Nmh-test -nodate
 cp -f "${MH_TEST_DIR}/Mail/inbox/1" "$actual"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "$expected-nodate"
 run_prog anno 1 -component Nmh-test -nodate
 cp -f "${MH_TEST_DIR}/Mail/inbox/1" "$actual"
@@ -129,12 +139,14 @@ check "$expected-nodate" "$actual"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -date
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -date
+start_test "-date"
 run_prog anno 1 -component Nmh-test -nodate -date
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual"
 check "$expected" "$actual" 'keep first'
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -draft.
 run_prog anno 1 -component Nmh-test -nodate -date
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual"
 check "$expected" "$actual" 'keep first'
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -draft.
+start_test "-draft."
 cp -f "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/draft"
 run_prog anno -draft -component Nmh-test
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/draft" >"$actual"
 cp -f "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/draft"
 run_prog anno -draft -component Nmh-test
 sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/draft" >"$actual"
@@ -142,6 +154,7 @@ check "$expected" "$actual"
 rm "${MH_TEST_DIR}/Mail/draft"
 
 # check -append
 rm "${MH_TEST_DIR}/Mail/draft"
 
 # check -append
+start_test "-append"
 sed -e 's/\(Subject: Testing message 1\)/\1\
 Nmh-test:/' <"${MH_TEST_DIR}/Mail/inbox/1" >"$expected"
 run_prog anno 1 -component Nmh-test -append
 sed -e 's/\(Subject: Testing message 1\)/\1\
 Nmh-test:/' <"${MH_TEST_DIR}/Mail/inbox/1" >"$expected"
 run_prog anno 1 -component Nmh-test -append
@@ -150,15 +163,18 @@ check "$expected" "$actual"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -list
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -list
+start_test "-list"
 printf 'Nmh-test: test of anno -list\n' >"$expected"
 cat "${MH_TEST_DIR}/Mail/inbox/1" >>"$expected"
 run_prog anno 1 -component Nmh-test -nodate -text 'test of anno -list'
 run_test 'anno 1 -component Nmh-test -list' 'test of anno -list'
 # check -text
 printf 'Nmh-test: test of anno -list\n' >"$expected"
 cat "${MH_TEST_DIR}/Mail/inbox/1" >>"$expected"
 run_prog anno 1 -component Nmh-test -nodate -text 'test of anno -list'
 run_test 'anno 1 -component Nmh-test -list' 'test of anno -list'
 # check -text
+start_test "-text"
 check "$expected" "${MH_TEST_DIR}/Mail/inbox/1"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -list -number
 check "$expected" "${MH_TEST_DIR}/Mail/inbox/1"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -list -number
+start_test "-list -number"
 printf 'Nmh-test: test of anno -list -number\n' >"$expected"
 cat "${MH_TEST_DIR}/Mail/inbox/1" >>"$expected"
 run_prog anno 1 -component Nmh-test -nodate -text 'test of anno -list -number'
 printf 'Nmh-test: test of anno -list -number\n' >"$expected"
 cat "${MH_TEST_DIR}/Mail/inbox/1" >>"$expected"
 run_prog anno 1 -component Nmh-test -nodate -text 'test of anno -list -number'
@@ -168,6 +184,7 @@ check "$expected" "${MH_TEST_DIR}/Mail/inbox/1"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -delete
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -delete
+start_test "-delete"
 cp "${MH_TEST_DIR}/Mail/inbox/1" "$expected"
 run_prog anno 1 -component Nmh-test
 run_prog anno 1 -component Nmh-test -delete
 cp "${MH_TEST_DIR}/Mail/inbox/1" "$expected"
 run_prog anno 1 -component Nmh-test
 run_prog anno 1 -component Nmh-test -delete
@@ -176,6 +193,7 @@ check "$expected" "$actual"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -delete -number
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -delete -number
+start_test "-delete -number"
 printf 'Nmh-test: 1\nNmh-test: 3\n' >"$expected"
 cat "${MH_TEST_DIR}/Mail/inbox/1" >>"$expected"
 run_prog anno 1 -component Nmh-test -nodate -text 3
 printf 'Nmh-test: 1\nNmh-test: 3\n' >"$expected"
 cat "${MH_TEST_DIR}/Mail/inbox/1" >>"$expected"
 run_prog anno 1 -component Nmh-test -nodate -text 3
@@ -187,6 +205,7 @@ check "$expected" "$actual"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -delete -all
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -delete -all
+start_test "-delete -all"
 cp "${MH_TEST_DIR}/Mail/inbox/1" "$expected"
 run_prog anno 1 -component Nmh-test -nodate -text 3
 run_prog anno 1 -component Nmh-test -nodate -text 2
 cp "${MH_TEST_DIR}/Mail/inbox/1" "$expected"
 run_prog anno 1 -component Nmh-test -nodate -text 3
 run_prog anno 1 -component Nmh-test -nodate -text 2
@@ -197,6 +216,7 @@ check "$expected" "$actual"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -preserve
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -preserve
+start_test "-preserve"
 touch -t '201210010000.00' "${MH_TEST_DIR}/Mail/inbox/1"
 ls -l "${MH_TEST_DIR}/Mail/inbox/1" >"$actual-ls1"
 run_prog anno 1 -component Nmh-test -preserve
 touch -t '201210010000.00' "${MH_TEST_DIR}/Mail/inbox/1"
 ls -l "${MH_TEST_DIR}/Mail/inbox/1" >"$actual-ls1"
 run_prog anno 1 -component Nmh-test -preserve
@@ -206,6 +226,7 @@ check "$actual-ls1" "$actual-ls2"
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -nopreserve
 cp -f "${MH_TEST_DIR}/Mail/inbox/11" "${MH_TEST_DIR}/Mail/inbox/1"
 
 # check -nopreserve
+start_test "-nopreserve"
 touch -t '2012100100.00' "${MH_TEST_DIR}/Mail/inbox/1"
 ls -l "${MH_TEST_DIR}/Mail/inbox/1" >"$actual-ls1"
 run_prog anno 1 -component Nmh-test -preserve -nopreserve
 touch -t '2012100100.00' "${MH_TEST_DIR}/Mail/inbox/1"
 ls -l "${MH_TEST_DIR}/Mail/inbox/1" >"$actual-ls1"
 run_prog anno 1 -component Nmh-test -preserve -nopreserve
@@ -218,4 +239,5 @@ set -e
 rm "$actual-ls1" "$actual-ls2"
 
 
 rm "$actual-ls1" "$actual-ls2"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 1db6965c2f7e209e0a4f728add2a4037ef2db67b..9a2932fd7f0a77d47769d51c5914e5ee63729f69 100755 (executable)
@@ -23,6 +23,7 @@ actual="$MH_TEST_DIR/$$.actual"
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: packf [+folder] [msgs] [switches]
   switches are:
 cat >"$expected" <<EOF
 Usage: packf [+folder] [msgs] [switches]
   switches are:
@@ -38,6 +39,7 @@ packf -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `packf -v` in
   packf\ --*) ;;
   *         ) printf '%s: packf -v generated unexpected output\n' "$0" >&2
 case `packf -v` in
   packf\ --*) ;;
   *         ) printf '%s: packf -v generated unexpected output\n' "$0" >&2
@@ -45,12 +47,14 @@ case `packf -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test "packf -nonexistent" 'packf: -nonexistent unknown'
 
 cd "${MH_TEST_DIR}"  ||  exit 1
 printf 'y\n' >Mail/yes
 
 # check with no switches
 run_test "packf -nonexistent" 'packf: -nonexistent unknown'
 
 cd "${MH_TEST_DIR}"  ||  exit 1
 printf 'y\n' >Mail/yes
 
 # check with no switches
+start_test "with no switches"
 run_prog packf <Mail/yes
 inc +inbox2 -file msgbox <Mail/yes >/dev/null
 rm -f msgbox
 run_prog packf <Mail/yes
 inc +inbox2 -file msgbox <Mail/yes >/dev/null
 rm -f msgbox
@@ -61,6 +65,7 @@ run_test "printf $i" '10'
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check +folder
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check +folder
+start_test "+folder"
 run_prog packf +inbox <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
 run_prog packf +inbox <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
@@ -71,6 +76,7 @@ run_test "printf $i" '10'
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check msgs
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check msgs
+start_test "msgs"
 run_prog packf +inbox 1 2 3 <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
 run_prog packf +inbox 1 2 3 <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
@@ -81,6 +87,7 @@ run_test "printf $i" '3'
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check -file
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check -file
+start_test "-file"
 run_prog packf +inbox -file msgbox2 <Mail/yes
 inc +inbox2 -file msgbox2 >/dev/null
 for i in `pick +inbox2`; do
 run_prog packf +inbox -file msgbox2 <Mail/yes
 inc +inbox2 -file msgbox2 >/dev/null
 for i in `pick +inbox2`; do
@@ -90,6 +97,7 @@ run_test "printf $i" '10'
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check append to existing mbox file
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check append to existing mbox file
+start_test "append to existing mbox file"
 run_prog packf +inbox -file msgbox2 <Mail/yes
 inc +inbox2 -file msgbox2 >/dev/null
 rm -f msgbox2
 run_prog packf +inbox -file msgbox2 <Mail/yes
 inc +inbox2 -file msgbox2 >/dev/null
 rm -f msgbox2
@@ -105,6 +113,7 @@ run_test "printf $i" '20'
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check -mbox
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check -mbox
+start_test "-mbox"
 run_prog packf +inbox -mbox <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
 run_prog packf +inbox -mbox <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
@@ -115,6 +124,7 @@ run_test "printf $i" '10'
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check -mmdf
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check -mmdf
+start_test "-mmdf"
 run_prog packf +inbox -mmdf <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
 run_prog packf +inbox -mmdf <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
@@ -125,6 +135,7 @@ run_test "printf $i" '10'
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check append to existing mmdf file
 rmm +inbox2 -unlink `pick +inbox2`
 
 # check append to existing mmdf file
+start_test "append to existing mmdf file"
 run_prog packf +inbox -mmdf <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
 run_prog packf +inbox -mmdf <Mail/yes
 inc +inbox2 -file msgbox >/dev/null
 rm -f msgbox
@@ -140,4 +151,5 @@ run_test "printf $i" '10'
 rmm +inbox2 -unlink `pick +inbox2`
 
 
 rmm +inbox2 -unlink `pick +inbox2`
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 491bf5cff42683252038cb579eb0fcb87aa67882..7835516713095321c28cf9dd98178a323f95689a 100755 (executable)
@@ -24,6 +24,7 @@ actual=$MH_TEST_DIR/$$.actual
 cd $MH_TEST_DIR
 
 # check -help
 cd $MH_TEST_DIR
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: sortm [+folder] [msgs] [switches]
   switches are:
 cat >"$expected" <<EOF
 Usage: sortm [+folder] [msgs] [switches]
   switches are:
@@ -44,6 +45,7 @@ run_prog sortm -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `sortm -version` in
   sortm\ --*) ;;
   *       ) echo "$0: sortm -v generated unexpected output" 1>&2
 case `sortm -version` in
   sortm\ --*) ;;
   *       ) echo "$0: sortm -v generated unexpected output" 1>&2
@@ -71,6 +73,7 @@ This is message number 12
 EOF
 
 # check with no options
 EOF
 
 # check with no options
+start_test "with no options"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test1              Testing message 1<<This is message number 1 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test1              Testing message 1<<This is message number 1 >>
@@ -91,6 +94,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check +folder
 check "$expected" "$actual"
 
 # check +folder
+start_test "+folder"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2+ 09/29 Test1              Testing message 1<<This is message number 1 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2+ 09/29 Test1              Testing message 1<<This is message number 1 >>
@@ -112,6 +116,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -verbose
 check "$expected" "$actual"
 
 # check -verbose
+start_test "-verbose"
 cat >"$expected" <<EOF
 sorting by datefield date
 renaming message chain from 12 to 1
 cat >"$expected" <<EOF
 sorting by datefield date
 renaming message chain from 12 to 1
@@ -146,6 +151,7 @@ scan -width 80 >>"$actual"
 check "$expected" "$actual"
 
 # check -noverbose
 check "$expected" "$actual"
 
 # check -noverbose
+start_test "-noverbose"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2+ 09/29 Test1              Testing message 1<<This is message number 1 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2+ 09/29 Test1              Testing message 1<<This is message number 1 >>
@@ -167,6 +173,7 @@ scan -width 80 >>"$actual"
 check "$expected" "$actual"
 
 # check msgs
 check "$expected" "$actual"
 
 # check msgs
+start_test "msgs"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test2              Testing message 2<<This is message number 2 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test2              Testing message 2<<This is message number 2 >>
@@ -188,6 +195,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -datefield
 check "$expected" "$actual"
 
 # check -datefield
+start_test "-datefield"
 cat >"$expected" <<EOF
    1  09/29 Test11             Re: common subject<<This is message number 11 >>
    2  09/29 Test2              Testing message 2<<This is message number 2 >>
 cat >"$expected" <<EOF
    1  09/29 Test11             Re: common subject<<This is message number 11 >>
    2  09/29 Test2              Testing message 2<<This is message number 2 >>
@@ -208,6 +216,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -textfield subject (datefield major, subjects grouped)
 check "$expected" "$actual"
 
 # check -textfield subject (datefield major, subjects grouped)
+start_test "-textfield subject (datefield major, subjects grouped)"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test11             Re: common subject<<This is message number 11 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test11             Re: common subject<<This is message number 11 >>
@@ -228,6 +237,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -nolimit
 check "$expected" "$actual"
 
 # check -nolimit
+start_test "-nolimit"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test11             Re: common subject<<This is message number 11 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test11             Re: common subject<<This is message number 11 >>
@@ -248,6 +258,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -textfield subject -limit 0 (subject sort)
 check "$expected" "$actual"
 
 # check -textfield subject -limit 0 (subject sort)
+start_test "-textfield subject -limit 0 (subject sort)"
 cat >"$expected" <<EOF
    1  09/29 Test11             Re: common subject<<This is message number 11 >>
    2  09/28 Test12             common subject<<This is message number 12 >>
 cat >"$expected" <<EOF
    1  09/29 Test11             Re: common subject<<This is message number 11 >>
    2  09/28 Test12             common subject<<This is message number 12 >>
@@ -269,6 +280,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -textfield -limit 0 (text sort)
 check "$expected" "$actual"
 
 # check -textfield -limit 0 (text sort)
+start_test "-textfield -limit 0 (text sort)"
 cat >"$expected" <<EOF
    1  09/29 Test10             Testing message 10<<This is message number 10 >>
    2  09/29 Test11             Re: common subject<<This is message number 11 >>
 cat >"$expected" <<EOF
    1  09/29 Test10             Testing message 10<<This is message number 10 >>
    2  09/29 Test11             Re: common subject<<This is message number 11 >>
@@ -290,6 +302,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -textfield with finite -limit that doesn't cover message 13
 check "$expected" "$actual"
 
 # check -textfield with finite -limit that doesn't cover message 13
+start_test "-textfield with finite -limit that doesn't cover message 13"
 cat >$MH_TEST_DIR/Mail/inbox/13 <<EOF || exit 1
 From: Test13 <test13@example.com>
 To: Some User <user@example.com>
 cat >$MH_TEST_DIR/Mail/inbox/13 <<EOF || exit 1
 From: Test13 <test13@example.com>
 To: Some User <user@example.com>
@@ -321,6 +334,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -textfield with finite -limit that does cover message 13
 check "$expected" "$actual"
 
 # check -textfield with finite -limit that does cover message 13
+start_test "-textfield with finite -limit that does cover message 13"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test11             Re: common subject<<This is message number 11 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test11             Re: common subject<<This is message number 11 >>
@@ -343,6 +357,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -notextfield
 check "$expected" "$actual"
 
 # check -notextfield
+start_test "-notextfield"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test10             Testing message 10<<This is message number 10 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2  09/29 Test10             Testing message 10<<This is message number 10 >>
@@ -365,9 +380,11 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -noall
 check "$expected" "$actual"
 
 # check -noall
+start_test "-noall"
 run_test 'sortm -noall' 'sortm: must specify messages to sort with -noall'
 
 # check -all
 run_test 'sortm -noall' 'sortm: must specify messages to sort with -noall'
 
 # check -all
+start_test "-all"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2+ 09/29 Test10             Testing message 10<<This is message number 10 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2+ 09/29 Test10             Testing message 10<<This is message number 10 >>
@@ -390,6 +407,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -check
 check "$expected" "$actual"
 
 # check -check
+start_test "-check"
 cat >"$expected" <<EOF
 sortm: can't parse date field in message 14, will use file modification time
 sortm: errors found, no messages sorted
 cat >"$expected" <<EOF
 sortm: can't parse date field in message 14, will use file modification time
 sortm: errors found, no messages sorted
@@ -421,6 +439,7 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 # check -nocheck
 check "$expected" "$actual"
 
 # check -nocheck
+start_test "-nocheck"
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2+ 09/29 Test10             Testing message 10<<This is message number 10 >>
 cat >"$expected" <<EOF
    1  09/28 Test12             common subject<<This is message number 12 >>
    2+ 09/29 Test10             Testing message 10<<This is message number 10 >>
@@ -446,4 +465,5 @@ scan -width 80 >"$actual"
 check "$expected" "$actual"
 
 
 check "$expected" "$actual"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 09d47f8cac647bacbced33a68564d340270fdc3d..bf27d4757ffb1184c687fc64f6973f8507d177c0 100755 (executable)
@@ -37,6 +37,7 @@ actual_err="$MH_TEST_DIR/$$.actual_err"
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: dp [switches] dates ...
   switches are:
 cat >"$expected" <<EOF
 Usage: dp [switches] dates ...
   switches are:
@@ -52,6 +53,7 @@ run_prog "$dp" -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `$dp -v` in
   dp\ --*) ;;
   *      ) printf '%s: dp -v generated unexpected output\n' "$0" >&2
 case `$dp -v` in
   dp\ --*) ;;
   *      ) printf '%s: dp -v generated unexpected output\n' "$0" >&2
@@ -59,12 +61,15 @@ case `$dp -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test "$dp -nonexistent" 'dp: -nonexistent unknown'
 
 # check with no switches
 run_test "$dp -nonexistent" 'dp: -nonexistent unknown'
 
 # check with no switches
+start_test "with no switches"
 run_test "$dp" 'dp: usage: dp [switches] dates ...'
 
 # check with one valid date
 run_test "$dp" 'dp: usage: dp [switches] dates ...'
 
 # check with one valid date
+start_test "with one valid date"
 cat >"$expected" <<EOF
 Sun, 01 Jul 2012 00:00:00
 EOF
 cat >"$expected" <<EOF
 Sun, 01 Jul 2012 00:00:00
 EOF
@@ -73,6 +78,7 @@ run_prog $dp 'Sun Jul  1 2012' > "$actual" 2>&1
 check "$expected" "$actual"
 
 # check with two valid dates
 check "$expected" "$actual"
 
 # check with two valid dates
+start_test "with two valid dates"
 cat >"$expected" <<EOF
 Sun, 01 Jul 2012 00:00:00
 Mon, 02 Jul 2012 00:00:00
 cat >"$expected" <<EOF
 Sun, 01 Jul 2012 00:00:00
 Mon, 02 Jul 2012 00:00:00
@@ -82,6 +88,7 @@ run_prog $dp 'Sun Jul  1 2012' 'Mon Jul  2 2012' > "$actual" 2>&1
 check "$expected" "$actual"
 
 # check with invalid date
 check "$expected" "$actual"
 
 # check with invalid date
+start_test "with invalid date"
 cat >"$expected" <<EOF
 error: not a date
 EOF
 cat >"$expected" <<EOF
 error: not a date
 EOF
@@ -94,6 +101,7 @@ check "$expected" "$actual"
 check "$expected_err" "$actual_err"
 
 # check -form
 check "$expected_err" "$actual_err"
 
 # check -form
+start_test "-form"
 form="${MH_TEST_DIR}/Mail/dp-form"
 cat >"$form" <<'EOF'
 %(day{text})
 form="${MH_TEST_DIR}/Mail/dp-form"
 cat >"$form" <<'EOF'
 %(day{text})
@@ -108,6 +116,7 @@ check $expected $actual
 rm -f "$form"
 
 # check -format
 rm -f "$form"
 
 # check -format
+start_test "-format"
 cat >"$expected" <<EOF
 Sun
 EOF
 cat >"$expected" <<EOF
 Sun
 EOF
@@ -116,6 +125,7 @@ run_prog $dp -format '%(day{text})' 'Jul 1 2012' >$actual 2>&1
 check $expected $actual
 
 # check -width
 check $expected $actual
 
 # check -width
+start_test "-width"
 cat >"$expected" <<EOF
 Sun, 01 Jul 2012 
 EOF
 cat >"$expected" <<EOF
 Sun, 01 Jul 2012 
 EOF
@@ -124,4 +134,5 @@ run_prog $dp -width 17 'Sun Jul  1 2012' > "$actual" 2>&1
 check "$expected" "$actual"
 
 
 check "$expected" "$actual"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index eded03624124cf1d2c8a2bcc8509fa396aadf5db..6cbdfe4f0e81172f630f15f1460e562aaf42fed4 100755 (executable)
@@ -49,6 +49,7 @@ actual_err=$MH_TEST_DIR/$$.actual_err
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >$expected <<EOF
 Usage: fmtdump [switches]
   switches are:
 cat >$expected <<EOF
 Usage: fmtdump [switches]
   switches are:
@@ -63,6 +64,7 @@ EOF
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `$fmtdump -v` in
   fmtdump\ --*) ;;
   *           ) printf '%s: fmtdump -v generated unexpected output\n' "$0" >&2
 case `$fmtdump -v` in
   fmtdump\ --*) ;;
   *           ) printf '%s: fmtdump -v generated unexpected output\n' "$0" >&2
@@ -70,9 +72,11 @@ case `$fmtdump -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test "$fmtdump -nonexistent" 'fmtdump: -nonexistent unknown'
 
 # check with no switches
 run_test "$fmtdump -nonexistent" 'fmtdump: -nonexistent unknown'
 
 # check with no switches
+start_test "with no switches"
 cat >$expected <<EOF
        LV_DAT, value dat[0]
        NUMF, width 4, fill ' '
 cat >$expected <<EOF
        LV_DAT, value dat[0]
        NUMF, width 4, fill ' '
@@ -130,6 +134,7 @@ run_prog $fmtdump >$actual 2>&1
 check $expected $actual
 
 # check -form
 check $expected $actual
 
 # check -form
+start_test "-form"
 cat >$expected <<EOF
        LV_DAT, value dat[0]
        NUMF, width 4, fill ' '
 cat >$expected <<EOF
        LV_DAT, value dat[0]
        NUMF, width 4, fill ' '
@@ -189,6 +194,7 @@ run_prog $fmtdump -form "$MH_INST_DIR${nmhetcdir}/scan.default" >$actual 2>&1
 check $expected $actual
 
 # check -format
 check $expected $actual
 
 # check -format
+start_test "-format"
 cat >$expected <<EOF
        LS_LIT str "1234567890"
        IF_S continue else goto L0
 cat >$expected <<EOF
        LS_LIT str "1234567890"
        IF_S continue else goto L0
@@ -201,4 +207,5 @@ run_prog $fmtdump -format '%<(lit 1234567890)%(strlen)%>' >$actual 2>&1
 check $expected $actual
 
 
 check $expected $actual
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 805ddfecda11f99f506f13acb21eb7c7ccaaedde..337da408f1445e81a214adb1d3e3b1d085928c94 100755 (executable)
@@ -16,29 +16,35 @@ expected="$MH_TEST_DIR/test-functions$$.expected"
 actual="$MH_TEST_DIR/test-functions$$.actual"
 
 # check sday when day of week is specified
 actual="$MH_TEST_DIR/test-functions$$.actual"
 
 # check sday when day of week is specified
+start_test "sday when day of week is specified"
 printf '1\n' >"$expected"
 fmttest -raw -format '%(sday{text})' 'Fri Sep 12 20:02 2014' >"$actual"
 check "$expected" "$actual"
 
 # check sday when day of week is not specified
 printf '1\n' >"$expected"
 fmttest -raw -format '%(sday{text})' 'Fri Sep 12 20:02 2014' >"$actual"
 check "$expected" "$actual"
 
 # check sday when day of week is not specified
+start_test "sday when day of week is not specified"
 printf '0\n' >"$expected"
 fmttest -raw -format '%(sday{text})' 'Sep 12 20:02 2014' >"$actual"
 check "$expected" "$actual"
 
 # check negative number, without padding
 printf '0\n' >"$expected"
 fmttest -raw -format '%(sday{text})' 'Sep 12 20:02 2014' >"$actual"
 check "$expected" "$actual"
 
 # check negative number, without padding
+start_test "negative number, without padding"
 printf '%s\n' ' -42' >"$expected"
 fmttest -raw -format '%4(minus -42)' 0 >"$actual"
 check "$expected" "$actual"
 
 # check negative number, with padding
 printf '%s\n' ' -42' >"$expected"
 fmttest -raw -format '%4(minus -42)' 0 >"$actual"
 check "$expected" "$actual"
 
 # check negative number, with padding
+start_test "negative number, with padding"
 # Output was "0-42" with nmh 1.6 and earlier.
 printf '%s\n' -042 >"$expected"
 fmttest -raw -format '%04(minus -42)' 0 >"$actual"
 check "$expected" "$actual"
 
 # check multiply
 # Output was "0-42" with nmh 1.6 and earlier.
 printf '%s\n' -042 >"$expected"
 fmttest -raw -format '%04(minus -42)' 0 >"$actual"
 check "$expected" "$actual"
 
 # check multiply
+start_test "multiply"
 printf '%s\n' 42 >"$expected"
 fmttest -raw -format '%(void(num 7))%(multiply 6)' 0 >"$actual"
 check "$expected" "$actual"
 
 printf '%s\n' 42 >"$expected"
 fmttest -raw -format '%(void(num 7))%(multiply 6)' 0 >"$actual"
 check "$expected" "$actual"
 
+finish_test
 exit $failed
 exit $failed
index 6185e38855965b508dac48decd1a4b668a92d5cd..ee5e7270f000085b02da01f8e4bff5a15a51ef25 100755 (executable)
@@ -53,9 +53,11 @@ run_test "echo \
          1 "Local-Mailbox with Alternate-Mailbox test"
 
 # check getmymbox, without match
          1 "Local-Mailbox with Alternate-Mailbox test"
 
 # check getmymbox, without match
+start_test "getmymbox, without match"
 run_test 'fmttest -message -format %(getmymbox{from}) first' ''
 
 # check getmyaddr, without match
 run_test 'fmttest -message -format %(getmymbox{from}) first' ''
 
 # check getmyaddr, without match
+start_test "getmyaddr, without match"
 run_test 'fmttest -message -format %(getmyaddr{from}) first' ''
 
 grep -v 'Alternate-Mailboxes: ' "$MH" > "$MH".new
 run_test 'fmttest -message -format %(getmyaddr{from}) first' ''
 
 grep -v 'Alternate-Mailboxes: ' "$MH" > "$MH".new
@@ -65,14 +67,17 @@ Alternate-Mailboxes: test1@example.com
 EOF
 
 # check getmymbox, with match
 EOF
 
 # check getmymbox, with match
+start_test "getmymbox, with match"
 run_test 'fmttest -message -format %(getmymbox{from}) first' \
          'Test1 <test1@example.com>'
 
 # check getmyaddr, with match
 run_test 'fmttest -message -format %(getmymbox{from}) first' \
          'Test1 <test1@example.com>'
 
 # check getmyaddr, with match
+start_test "getmyaddr, with match"
 run_test 'fmttest -message -format %(getmyaddr{from}) first' \
          'test1@example.com'
 
 # check getmymbox and getmyaddr, with match of other than first address in
 run_test 'fmttest -message -format %(getmyaddr{from}) first' \
          'test1@example.com'
 
 # check getmymbox and getmyaddr, with match of other than first address in
+start_test "getmymbox and getmyaddr, with match of other than first address in"
 #   component
 cat >`mhpath new` <<'EOF'
 From: Test11 <test11@example.com>
 #   component
 cat >`mhpath new` <<'EOF'
 From: Test11 <test11@example.com>
@@ -90,4 +95,5 @@ run_test 'fmttest -message -format %(getmymbox{cc}) last' \
 run_test 'fmttest -message -format %(getmyaddr{cc}) last' \
          'test1@example.com'
 
 run_test 'fmttest -message -format %(getmyaddr{cc}) last' \
          'test1@example.com'
 
+finish_test
 exit $failed
 exit $failed
index 4dd5a2657a5c27c05d0efebc25d03ea800335853..70cb0ed816bef3f4199f86a2b3c41d0b2f8db8c6 100755 (executable)
@@ -200,6 +200,7 @@ run_test "scan -width 120 +inbox 11" \
        "  11+ 03/01 Mr Nobody          Who is on first?<<Abbott: Every dollar of it. And why not, the man's entitled to it. Cost"
 
 # check header field name with ':' character than lands on m_getfld() buffer
        "  11+ 03/01 Mr Nobody          Who is on first?<<Abbott: Every dollar of it. And why not, the man's entitled to it. Cost"
 
 # check header field name with ':' character than lands on m_getfld() buffer
+start_test "header field name with ':' character than lands on m_getfld() buffer"
 cat >"$MH_TEST_DIR/mess" <<EOF
 Comments: The important characteristic of this message is that the 8193'rd
 Comments: byte is the ':' at the end of header field name.  That tests some
 cat >"$MH_TEST_DIR/mess" <<EOF
 Comments: The important characteristic of this message is that the 8193'rd
 Comments: byte is the ':' at the end of header field name.  That tests some
@@ -319,6 +320,7 @@ run_test 'scan -width 60 -file '"$MH_TEST_DIR/mess" \
 rm -f "$MH_TEST_DIR/mess"
 
 # check m_getfld() handling of fields with trailing whitespace
 rm -f "$MH_TEST_DIR/mess"
 
 # check m_getfld() handling of fields with trailing whitespace
+start_test "m_getfld() handling of fields with trailing whitespace"
 # Even though header field names aren't supposed to have spaces (RFC
 # 28220, m_getfld () trims trailing whitespace from them.
 cat >`mhpath new` <<EOF
 # Even though header field names aren't supposed to have spaces (RFC
 # 28220, m_getfld () trims trailing whitespace from them.
 cat >`mhpath new` <<EOF
@@ -330,6 +332,7 @@ EOF
 run_test 'scan last' '  12  12/18 foo@example.edu    test'
 
 # check header field body with more than 511 characters
 run_test 'scan last' '  12  12/18 foo@example.edu    test'
 
 # check header field body with more than 511 characters
+start_test "header field body with more than 511 characters"
 cat >"$MH_TEST_DIR/mess" <<EOF
 Comments: The important characteristic of this message is that this header
           field body is more than 511 bytes long.  That tests the logic in
 cat >"$MH_TEST_DIR/mess" <<EOF
 Comments: The important characteristic of this message is that this header
           field body is more than 511 bytes long.  That tests the logic in
@@ -350,6 +353,7 @@ run_test 'scan -width 80 -file '"$MH_TEST_DIR"'/mess' \
 rm -f "$MH_TEST_DIR/mess"
 
 # check inc of message with header field body with more than 511 characters
 rm -f "$MH_TEST_DIR/mess"
 
 # check inc of message with header field body with more than 511 characters
+start_test "inc of message with header field body with more than 511 characters"
 cat >"$expected" <<EOF
 Comments: The important characteristic of this message is that this header
           field body is more than 511 bytes long.  That tests the logic in
 cat >"$expected" <<EOF
 Comments: The important characteristic of this message is that this header
           field body is more than 511 bytes long.  That tests the logic in
@@ -386,6 +390,7 @@ check "$expected" `mhpath last`  ||  rmm last
 rm -f "$MH_TEST_DIR/mess"
 
 # check scan and inc of mbox with multiple messages
 rm -f "$MH_TEST_DIR/mess"
 
 # check scan and inc of mbox with multiple messages
+start_test "scan and inc of mbox with multiple messages"
 echo y | packf -file "$MH_TEST_DIR/msgbox"
 run_test "scan -width 80 -file $MH_TEST_DIR/msgbox" \
 '   1  09/29 Test1              Testing message 1<<This is message number 1 >>
 echo y | packf -file "$MH_TEST_DIR/msgbox"
 run_test "scan -width 80 -file $MH_TEST_DIR/msgbox" \
 '   1  09/29 Test1              Testing message 1<<This is message number 1 >>
@@ -418,6 +423,7 @@ run_test "inc -width 80 -file $MH_TEST_DIR/msgbox -truncate" \
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check mbox with two blank lines between header and body
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check mbox with two blank lines between header and body
+start_test "mbox with two blank lines between header and body"
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Mon, 15 Apr 2013 21:02:12 -0500
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Mon, 15 Apr 2013 21:02:12 -0500
@@ -434,6 +440,7 @@ run_test "inc -width 60 -file $MH_TEST_DIR/msgbox -truncate" \
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check inc (m_getfld, actually) of very, very, very short message
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check inc (m_getfld, actually) of very, very, very short message
+start_test "inc (m_getfld, actually) of very, very, very short message"
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Tue, 6 Sep 2016 08:52:32 -0400
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Tue, 6 Sep 2016 08:52:32 -0400
@@ -449,6 +456,7 @@ run_test "inc -width 50 -file $MH_TEST_DIR/msgbox -truncate" \
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check inc (m_getfld, actually) of very, very short message
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check inc (m_getfld, actually) of very, very short message
+start_test "inc (m_getfld, actually) of very, very short message"
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Tue, 6 Sep 2016 08:52:32 -0400
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Tue, 6 Sep 2016 08:52:32 -0400
@@ -464,6 +472,7 @@ run_test "inc -width 50 -file $MH_TEST_DIR/msgbox -truncate" \
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check inc (m_getfld, actually) of very short message
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check inc (m_getfld, actually) of very short message
+start_test "inc (m_getfld, actually) of very short message"
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Tue, 6 Sep 2016 08:52:32 -0400
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Tue, 6 Sep 2016 08:52:32 -0400
@@ -479,6 +488,7 @@ run_test "inc -width 50 -file $MH_TEST_DIR/msgbox -truncate" \
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check inc (m_getfld, actually) of short message
 rm -f  "$MH_TEST_DIR/msgbox"
 
 # check inc (m_getfld, actually) of short message
+start_test "inc (m_getfld, actually) of short message"
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Tue, 6 Sep 2016 08:52:32 -0400
 cat >>"$MH_TEST_DIR/msgbox" <<EOF
 From 
 Date: Tue, 6 Sep 2016 08:52:32 -0400
@@ -494,4 +504,5 @@ run_test "inc -width 50 -file $MH_TEST_DIR/msgbox -truncate" \
 rm -f  "$MH_TEST_DIR/msgbox"
 
 
 rm -f  "$MH_TEST_DIR/msgbox"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 173a76dfa3a4684a47ee70192943eb5ea5000cbd..c3615543b7fd0230b91ecb718f0e24fc2321f71a 100755 (executable)
@@ -27,6 +27,7 @@ actual_err=$MH_TEST_DIR/$$.actual_err
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 # Only look at first 9 lines because the rest depend on
 # whether sasl support was configured in.
 cat >"$expected" <<EOF
 # Only look at first 9 lines because the rest depend on
 # whether sasl support was configured in.
 cat >"$expected" <<EOF
@@ -45,6 +46,7 @@ run_prog msgchk -help 2>&1 | head -9 >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `msgchk -v` in
   msgchk\ --*) ;;
   *          ) printf '%s: msgchk -v generated unexpected output\n' "$0" >&2
 case `msgchk -v` in
   msgchk\ --*) ;;
   *          ) printf '%s: msgchk -v generated unexpected output\n' "$0" >&2
@@ -52,9 +54,11 @@ case `msgchk -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test "msgchk -nonexistent" 'msgchk: -nonexistent unknown'
 
 # check with no arguments and no mail waiting
 run_test "msgchk -nonexistent" 'msgchk: -nonexistent unknown'
 
 # check with no arguments and no mail waiting
+start_test "with no arguments and no mail waiting"
 run_test 'msgchk' "You don't have any mail waiting"
 
 # Use maildrop specified in mts.conf, i.e.,
 run_test 'msgchk' "You don't have any mail waiting"
 
 # Use maildrop specified in mts.conf, i.e.,
@@ -63,6 +67,7 @@ run_test 'msgchk' "You don't have any mail waiting"
   "${MH_TEST_DIR}"/Mail/maildrop
 
 # check with no arguments and mail waiting
   "${MH_TEST_DIR}"/Mail/maildrop
 
 # check with no arguments and mail waiting
+start_test "with no arguments and mail waiting"
 cat >"$expected" <<EOF
 You have new mail waiting; last read on
 EOF
 cat >"$expected" <<EOF
 You have new mail waiting; last read on
 EOF
@@ -71,6 +76,7 @@ run_prog msgchk | sed -e 's/last read on.*/last read on/' >"$actual"
 check "$expected" "$actual"
 
 # check -date
 check "$expected" "$actual"
 
 # check -date
+start_test "-date"
 cat >"$expected" <<EOF
 You have new mail waiting; last read on
 EOF
 cat >"$expected" <<EOF
 You have new mail waiting; last read on
 EOF
@@ -80,45 +86,59 @@ run_prog msgchk -nodate -date | sed -e 's/last read on.*/last read on/' \
 check "$expected" "$actual"
 
 # check -nodate
 check "$expected" "$actual"
 
 # check -nodate
+start_test "-nodate"
 run_test 'msgchk -nodate' 'You have new mail waiting'
 
 # check -notify mail, when there is mail
 run_test 'msgchk -nodate' 'You have new mail waiting'
 
 # check -notify mail, when there is mail
+start_test "-notify mail, when there is mail"
 run_test 'msgchk -notify mail -nodate' 'You have new mail waiting'
 
 # check -notify nomail, when there is mail
 run_test 'msgchk -notify mail -nodate' 'You have new mail waiting'
 
 # check -notify nomail, when there is mail
+start_test "-notify nomail, when there is mail"
 run_test 'msgchk -notify nomail -nodate' 'You have new mail waiting'
 
 # check -notify all, when there is mail
 run_test 'msgchk -notify nomail -nodate' 'You have new mail waiting'
 
 # check -notify all, when there is mail
+start_test "-notify all, when there is mail"
 run_test 'msgchk -notify nomail -notify all -nodate' 'You have new mail waiting'
 
 # check -nonotify mail, when there is mail
 run_test 'msgchk -notify nomail -notify all -nodate' 'You have new mail waiting'
 
 # check -nonotify mail, when there is mail
+start_test "-nonotify mail, when there is mail"
 run_test 'msgchk -nonotify mail -nodate' ''
 
 # check -nonotify nomail, when there is mail
 run_test 'msgchk -nonotify mail -nodate' ''
 
 # check -nonotify nomail, when there is mail
+start_test "-nonotify nomail, when there is mail"
 run_test 'msgchk -nonotify nomail -nodate' 'You have new mail waiting'
 
 # check -nonotify all, when there is mail
 run_test 'msgchk -nonotify nomail -nodate' 'You have new mail waiting'
 
 # check -nonotify all, when there is mail
+start_test "-nonotify all, when there is mail"
 run_test 'msgchk -nonotify nomail -nonotify all -nodate' ''
 
 run_prog inc -silent
 
 # check -notify mail, when there is no mail
 run_test 'msgchk -nonotify nomail -nonotify all -nodate' ''
 
 run_prog inc -silent
 
 # check -notify mail, when there is no mail
+start_test "-notify mail, when there is no mail"
 run_test 'msgchk -notify mail -nodate' "You don't have any mail waiting"
 
 # check -notify nomail, when there is no mail
 run_test 'msgchk -notify mail -nodate' "You don't have any mail waiting"
 
 # check -notify nomail, when there is no mail
+start_test "-notify nomail, when there is no mail"
 run_test 'msgchk -notify nomail -nodate' "You don't have any mail waiting"
 
 # check -notify all, when there is no mail
 run_test 'msgchk -notify nomail -nodate' "You don't have any mail waiting"
 
 # check -notify all, when there is no mail
+start_test "-notify all, when there is no mail"
 run_test 'msgchk -notify nomail -nonotify all -nodate' ''
 
 # check -nonotify mail, when there is no mail
 run_test 'msgchk -notify nomail -nonotify all -nodate' ''
 
 # check -nonotify mail, when there is no mail
+start_test "-nonotify mail, when there is no mail"
 run_test 'msgchk -nonotify mail -nodate' "You don't have any mail waiting"
 
 # check -nonotify nomail, when there is no mail
 run_test 'msgchk -nonotify mail -nodate' "You don't have any mail waiting"
 
 # check -nonotify nomail, when there is no mail
+start_test "-nonotify nomail, when there is no mail"
 run_test 'msgchk -nonotify nomail -nodate' ''
 
 # check -nonotify all, when there is no mail
 run_test 'msgchk -nonotify nomail -nodate' ''
 
 # check -nonotify all, when there is no mail
+start_test "-nonotify all, when there is no mail"
 run_test 'msgchk -nonotify nomail -nonotify all -nodate' ''
 
 
 run_test 'msgchk -nonotify nomail -nonotify all -nodate' ''
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 64620173fb4e09907b364435f807a6663cad6708..8b3fbe03069a900345d99ee562de3e88a0776853 100755 (executable)
@@ -71,6 +71,7 @@ Dude, nmh is totally brutal.
 EOM
 
 # Check netrc's permissions test
 EOM
 
 # Check netrc's permissions test
+start_test "netrc's permissions test"
 pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" '' '' "$testmessage"`
 chmod g=w,o=x $netrc
 run_test "inc -user ${TESTUSER} -host 127.0.0.1 -port $testport" \
 pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" '' '' "$testmessage"`
 chmod g=w,o=x $netrc
 run_test "inc -user ${TESTUSER} -host 127.0.0.1 -port $testport" \
@@ -89,6 +90,7 @@ i"
 check "$testmessage" `mhpath +inbox 11` 'keep first'
 
 # Check multiple messages at once
 check "$testmessage" `mhpath +inbox 11` 'keep first'
 
 # Check multiple messages at once
+start_test "multiple messages at once"
 
 pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" \
                        "$TESTUSER" "$TESTPASS" "$testmessage" \
 
 pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" \
                        "$TESTUSER" "$TESTPASS" "$testmessage" \
@@ -108,6 +110,7 @@ check "${testmessage}.3" `mhpath +inbox 13`
 rm -f "$netrc"
 
 # check credentials: file
 rm -f "$netrc"
 
 # check credentials: file
+start_test "credentials: file"
 # Redirect stdin so that inc doesn't wait on the user if it can't
 # read the netrc file, even though that shouldn't happen.
 TESTUSER=differenuser
 # Redirect stdin so that inc doesn't wait on the user if it can't
 # read the netrc file, even though that shouldn't happen.
 TESTUSER=differenuser
@@ -129,4 +132,5 @@ check $testmessage `mhpath +inbox 11`
 
 rm -f "$netrc"
 
 
 rm -f "$netrc"
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 45a9e2b6fbcb42d62f583d4a4212b7087e3ce620..7afe64b484de1a3706b596cfd81cc8f501560ba0 100755 (executable)
@@ -19,13 +19,16 @@ setup_test
 check_exit '-eq 1' install-mh -
 
 # check with no options, with nmh already installed
 check_exit '-eq 1' install-mh -
 
 # check with no options, with nmh already installed
+start_test "with no options, with nmh already installed"
 run_test "install-mh" \
     'install-mh: You already have an nmh profile, use an editor to modify it'
 
 # check -auto, with nmh already installed
 run_test "install-mh" \
     'install-mh: You already have an nmh profile, use an editor to modify it'
 
 # check -auto, with nmh already installed
+start_test "-auto, with nmh already installed"
 run_test "install-mh -auto" 'install-mh: invocation error'
 
 # check -check, with nmh already installed
 run_test "install-mh -auto" 'install-mh: invocation error'
 
 # check -check, with nmh already installed
+start_test "-check, with nmh already installed"
 run_test "install-mh -check" ''
 # make sure exit status is 0
 run_prog install-mh -check
 run_test "install-mh -check" ''
 # make sure exit status is 0
 run_prog install-mh -check
@@ -35,6 +38,7 @@ run_test "echo $?" '0'
 rm -rf $MH_TEST_DIR/Mail
 
 # check -check, with nmh not installed
 rm -rf $MH_TEST_DIR/Mail
 
 # check -check, with nmh not installed
+start_test "-check, with nmh not installed"
 run_test "install-mh -check" ''
 # make sure exit status is 1
 set +e
 run_test "install-mh -check" ''
 # make sure exit status is 1
 set +e
@@ -43,6 +47,7 @@ run_test "echo $?" '1'
 set -e
 
 # check with no options, with nmh not installed.  Use canned
 set -e
 
 # check with no options, with nmh not installed.  Use canned
+start_test "with no options, with nmh not installed.  Use canned"
 # responses to install.
 installpath=`echo $MH_TEST_DIR/Mail | sed 's%^/%%'`
 echo "n
 # responses to install.
 installpath=`echo $MH_TEST_DIR/Mail | sed 's%^/%%'`
 echo "n
@@ -70,4 +75,5 @@ else
 fi
 
 
 fi
 
 
+finish_test
 exit $failed
 exit $failed
index cebf6e92b47ff75d9748bc977da019f759993744..931446042739b163049dcb7991113d6e72e6f9fd 100755 (executable)
@@ -51,6 +51,7 @@ check "$draft" "$expected"
 
 #
 # Check out more common case, one (or more) attachments
 
 #
 # Check out more common case, one (or more) attachments
+start_test "out more common case, one (or more) attachments"
 # along with message text.
 #
 
 # along with message text.
 #
 
@@ -128,6 +129,7 @@ check "$draft" "$expected"
 
 #
 # Check a completely empty message
 
 #
 # Check a completely empty message
+start_test "a completely empty message"
 #
 
 cat > "$draft" <<EOF
 #
 
 cat > "$draft" <<EOF
@@ -330,6 +332,7 @@ EOF
 check "$draft" "$expected"
 
 # check that blank line is inserted between header and content
 check "$draft" "$expected"
 
 # check that blank line is inserted between header and content
+start_test "that blank line is inserted between header and content"
 
 cat > "$MH_TEST_DIR/Mail/oneline" <<EOF
 There needs to be a blank line before this content line.
 
 cat > "$MH_TEST_DIR/Mail/oneline" <<EOF
 There needs to be a blank line before this content line.
@@ -375,4 +378,5 @@ check "$draft" "$expected"
 
 [ ${failed:=0} -eq 0 ]  &&  rm -f ${backup}
 
 
 [ ${failed:=0} -eq 0 ]  &&  rm -f ${backup}
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 2789ee2f4abac470588e906a3d733e8d3c635144..d543086fd9c0c38c906663dada82399db3e6cac7 100755 (executable)
@@ -34,6 +34,7 @@ expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
 
 # check mhbuild
 actual="$MH_TEST_DIR/$$.actual"
 
 # check mhbuild
+start_test "mhbuild"
 cat > $expected <<EOF
 To:
 cc:
 cat > $expected <<EOF
 To:
 cc:
@@ -73,6 +74,7 @@ check $expected $draft
 test ${failed:-0} -eq 0  &&  rm "$draftorig"
 
 # check mhbuild -rfc934
 test ${failed:-0} -eq 0  &&  rm "$draftorig"
 
 # check mhbuild -rfc934
+start_test "mhbuild -rfc934"
 cat > $expected <<EOF
 To:
 cc:
 cat > $expected <<EOF
 To:
 cc:
@@ -110,4 +112,5 @@ run_prog mhbuild -rfc934 $draft
 check $expected $draft
 test ${failed:-0} -eq 0  &&  rm "$draftorig"
 
 check $expected $draft
 test ${failed:-0} -eq 0  &&  rm "$draftorig"
 
+finish_test
 exit $failed
 exit $failed
index e0117fd2148debf6171a8313b5e603d1218a98ee..cf138872969a4eceb49a363ab4c83cb5941e33ad 100755 (executable)
@@ -61,6 +61,7 @@ EOF
 
 
 # check nortrim (default), and that trailing whitespace in a
 
 
 # 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: 
 # component is trimmed when filtering blank lines
 cat >"$expected" <<EOF
 > There are two blank lines below.  And there is a trailing space: 
@@ -78,6 +79,7 @@ check "$expected" "$actual"
 
 
 # check rtrim
 
 
 # check rtrim
+start_test "rtrim"
 cat >"$expected" <<EOF
 > There are two blank lines below.  And there is a trailing space:
 > And another trailing space:
 cat >"$expected" <<EOF
 > There are two blank lines below.  And there is a trailing space:
 > And another trailing space:
@@ -95,4 +97,5 @@ check "$expected" "$actual"
 
 rm -f "$MH_TEST_DIR/test.format"
 
 
 rm -f "$MH_TEST_DIR/test.format"
 
+finish_test
 exit $failed
 exit $failed
index cd85b95c0cad001413984889780f09d073fad71a..c396957883f0892ca73dd7e91ad9a7fb2a611715 100755 (executable)
@@ -68,6 +68,7 @@ actual_err=$MH_TEST_DIR/test-mhmail$$.actual_err
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 # Verified behavior consistent with compiled sendmail.
 cat >$expected <<EOF
 Usage: mhmail [-t(o)] addrs ... [switches]
 # Verified behavior consistent with compiled sendmail.
 cat >$expected <<EOF
 Usage: mhmail [-t(o)] addrs ... [switches]
@@ -94,6 +95,7 @@ check "$expected" "$actual"
 
 
 # check -version
 
 
 # check -version
+start_test "-version"
 # Verified same behavior as compiled mhmail.
 case `mhmail -v` in
   mhmail\ --*) ;;
 # Verified same behavior as compiled mhmail.
 case `mhmail -v` in
   mhmail\ --*) ;;
@@ -102,6 +104,7 @@ case `mhmail -v` in
 esac
 
 # check for missing argument to switches that require them
 esac
 
 # check for missing argument to switches that require them
+start_test "for missing argument to switches that require them"
 for switch in attach body cc from headerfield subject to; do
   run_test "mhmail recipient -$switch" \
            "mhmail: missing argument to -$switch"
 for switch in attach body cc from headerfield subject to; do
   run_test "mhmail recipient -$switch" \
            "mhmail: missing argument to -$switch"
@@ -117,6 +120,7 @@ done
 
 
 # check with no switches
 
 
 # check with no switches
+start_test "with no switches"
 # That will just run inc, which we don't want to do anything,
 # so tell inc to just display its version.
 # Verified same behavior as compiled mhmail.
 # That will just run inc, which we don't want to do anything,
 # so tell inc to just display its version.
 # Verified same behavior as compiled mhmail.
@@ -129,6 +133,7 @@ esac
 
 
 # check -nosend
 
 
 # check -nosend
+start_test "-nosend"
 # Not supported by compiled mhmail.
 mhmail -nosend recipient@example.com -from sender1@localhost \
   -server 127.0.0.1 -port $localport -body '' >"$actual" 2>"$actual_err"
 # Not supported by compiled mhmail.
 mhmail -nosend recipient@example.com -from sender1@localhost \
   -server 127.0.0.1 -port $localport -body '' >"$actual" 2>"$actual_err"
@@ -149,6 +154,7 @@ check "$expected_err" "$actual_err"
 
 
 # check -send
 
 
 # check -send
+start_test "-send"
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -169,6 +175,7 @@ test_mhmail "$expected" "-from sender2@localhost -nosend -send" '|' message
 
 
 # check -from
 
 
 # check -from
+start_test "-from"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -189,6 +196,7 @@ test_mhmail "$expected" "-from sender3@localhost" '|' message
 
 
 # check -from and -body
 
 
 # check -from and -body
+start_test "-from and -body"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -209,6 +217,7 @@ test_mhmail "$expected" "-from sender4@localhost" -b body
 
 
 # check -from and -cc
 
 
 # check -from and -cc
+start_test "-from and -cc"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -232,6 +241,7 @@ test_mhmail "$expected" \
 
 
 # check -from and multiple -cc addresses
 
 
 # check -from and multiple -cc addresses
+start_test "-from and multiple -cc addresses"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -259,6 +269,7 @@ test_mhmail "$expected" \
 
 
 # check -from and -subject
 
 
 # check -from and -subject
+start_test "-from and -subject"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -280,6 +291,7 @@ test_mhmail "$expected" '-from sender7@localhost -subject Test' '|' message
 
 
 # check -from and -profile
 
 
 # check -from and -profile
+start_test "-from and -profile"
 # Show that -profile causes mhmail to 1) read the profile and
 # 2) use send(1) by added a send switch to the profile and
 # verifying that it gets used.
 # Show that -profile causes mhmail to 1) read the profile and
 # 2) use send(1) by added a send switch to the profile and
 # verifying that it gets used.
@@ -308,6 +320,7 @@ test_mhmail "$expected" '-from sender8@localhost -profile' '|' message
 
 
 # check repeated -from and -subject switches
 
 
 # check repeated -from and -subject switches
+start_test "repeated -from and -subject switches"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -329,6 +342,7 @@ test_mhmail "$expected" '-from sender9@localhost -from sender9@localhost '\
 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
 
 # check repeated -body switches
 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
 
 # check repeated -body switches
+start_test "repeated -body switches"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -349,6 +363,7 @@ test_mhmail "$expected" "-from sender10@localhost -body body1" -b body2
 
 
 # check multiple -cc switches
 
 
 # check multiple -cc switches
+start_test "multiple -cc switches"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -373,6 +388,7 @@ test_mhmail "$expected" \
 
 
 # check separated -cc arguments
 
 
 # check separated -cc arguments
+start_test "separated -cc arguments"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -399,6 +415,7 @@ test_mhmail "$expected" \
 
 
 # check -cc switch followed by -to switch
 
 
 # check -cc switch followed by -to switch
+start_test "-cc switch followed by -to switch"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -426,6 +443,7 @@ test_mhmail "$expected" \
 
 
 # check with no newline on stdin
 
 
 # check with no newline on stdin
+start_test "with no newline on stdin"
 # Shows different behavior than compiled mhmail, which was silent in this case.
 cat > "$expected" <<EOF
 EOF
 # Shows different behavior than compiled mhmail, which was silent in this case.
 cat > "$expected" <<EOF
 EOF
@@ -445,6 +463,7 @@ check "$expected_err" "$actual_err"
 
 
 # check with one newline on stdin
 
 
 # check with one newline on stdin
+start_test "with one newline on stdin"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -466,6 +485,7 @@ test_mhmail "$expected" '-from sender14@localhost' '|' '
 
 
 # check with multiple newlines on stdin
 
 
 # check with multiple newlines on stdin
+start_test "with multiple newlines on stdin"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -491,6 +511,7 @@ test_mhmail "$expected" '-from sender15@localhost' '|' '
 
 
 # check with text and no trailing newline on stdin
 
 
 # check with text and no trailing newline on stdin
+start_test "with text and no trailing newline on stdin"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -511,6 +532,7 @@ test_mhmail "$expected" '-from sender16@localhost' '|' 'no newline in input'
 
 
 # check with text and multiple trailing blank lines on stdin
 
 
 # check with text and multiple trailing blank lines on stdin
+start_test "with text and multiple trailing blank lines on stdin"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -536,6 +558,7 @@ test_mhmail "$expected" '-from sender17@localhost' '|' "here's some text
 
 
 # check with no newline to -body
 
 
 # check with no newline to -body
+start_test "with no newline to -body"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -556,6 +579,7 @@ test_mhmail "$expected" '-from sender18@localhost' -b ''
 
 
 # check with one newline to -body
 
 
 # check with one newline to -body
+start_test "with one newline to -body"
 # Shows different behavior than compiled mhmail, which suppressed the newline.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Shows different behavior than compiled mhmail, which suppressed the newline.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -578,6 +602,7 @@ test_mhmail "$expected" '-from sender19@localhost' -b '
 
 
 # check with multiple newlines to -body
 
 
 # check with multiple newlines to -body
+start_test "with multiple newlines to -body"
 # Shows different behavior than compiled mhmail, which suppressed one
 #   of the newlines.
 cat > "$expected" <<EOF
 # Shows different behavior than compiled mhmail, which suppressed one
 #   of the newlines.
 cat > "$expected" <<EOF
@@ -605,6 +630,7 @@ test_mhmail "$expected" '-from sender20@localhost' -b '
 
 
 # check with text and no trailing newline to -body
 
 
 # check with text and no trailing newline to -body
+start_test "with text and no trailing newline to -body"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -625,6 +651,7 @@ test_mhmail "$expected" '-from sender21@localhost' -b 'no newline in input'
 
 
 # check with text and multiple trailing blank lines to -body
 
 
 # check with text and multiple trailing blank lines to -body
+start_test "with text and multiple trailing blank lines to -body"
 # Shows different behavior than compiled mhmail, which suppressed one
 #   of the newlines.
 cat > "$expected" <<EOF
 # Shows different behavior than compiled mhmail, which suppressed one
 #   of the newlines.
 cat > "$expected" <<EOF
@@ -650,6 +677,7 @@ test_mhmail "$expected" '-from sender22@localhost' -b "here's some text
 
 
 # check -resent
 
 
 # check -resent
+start_test "-resent"
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Verified same behavior as compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -678,6 +706,7 @@ please resend this message, 1'
 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
 
 # check -resent -profile, using stdin
 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
 
 # check -resent -profile, using stdin
+start_test "-resent -profile, using stdin"
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -708,6 +737,7 @@ please resend this message, 2'
 
 
 # check -resent -profile, using -b
 
 
 # check -resent -profile, using -b
+start_test "-resent -profile, using -b"
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -738,6 +768,7 @@ please resend this message, 3'
 
 
 # check -headerfield.
 
 
 # check -headerfield.
+start_test "-headerfield."
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -762,6 +793,7 @@ test_mhmail "$expected" \
 
 
 # check multiple -headerfields.
 
 
 # check multiple -headerfields.
+start_test "multiple -headerfields."
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -790,6 +822,7 @@ test_mhmail "$expected" \
 
 
 # check -attach
 
 
 # check -attach
+start_test "-attach"
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
 # Not supported by compiled mhmail.
 cat > "$expected" <<EOF
 EHLO nosuchhost.example.com
@@ -829,4 +862,5 @@ test_mhmail "$expected" \
 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
 
 
 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index c6521ce3d0181e122641c9a5aadff69b55b76c49..eebcc3c2a22d31ef1dc66f7092aa708b9a53c6e2 100755 (executable)
@@ -23,6 +23,7 @@ actual=$MH_TEST_DIR/$$.actual
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat > $expected <<EOF
 Usage: mhpath [+folder] [msgs] [switches]
   switches are:
 cat > $expected <<EOF
 Usage: mhpath [+folder] [msgs] [switches]
   switches are:
@@ -35,6 +36,7 @@ run_prog mhpath -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `mhpath -v` in
   mhpath\ --*) ;;
   *          ) echo "$0: mhpath -v generated unexpected output" 1>&2
 case `mhpath -v` in
   mhpath\ --*) ;;
   *          ) echo "$0: mhpath -v generated unexpected output" 1>&2
@@ -42,16 +44,20 @@ case `mhpath -v` in
 esac
 
 # check +
 esac
 
 # check +
+start_test "+"
 run_test "mhpath +" "$MH_TEST_DIR/Mail"
 
 # check with no options
 run_test "mhpath +" "$MH_TEST_DIR/Mail"
 
 # check with no options
+start_test "with no options"
 folder -fast +inbox > /dev/null
 run_test "mhpath" "$MH_TEST_DIR/Mail/inbox"
 
 # check +inbox
 folder -fast +inbox > /dev/null
 run_test "mhpath" "$MH_TEST_DIR/Mail/inbox"
 
 # check +inbox
+start_test "+inbox"
 run_test "mhpath +inbox" "$MH_TEST_DIR/Mail/inbox"
 
 # check all
 run_test "mhpath +inbox" "$MH_TEST_DIR/Mail/inbox"
 
 # check all
+start_test "all"
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/2
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/2
@@ -68,10 +74,12 @@ 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
+start_test "message number greater than highest"
 run_test "mhpath 11" "mhpath: message 11 out of range 1-10"
 run_test "mhpath 10 11" "mhpath: message 11 out of range 1-10"
 
 # check range with message number greater than highest
 run_test "mhpath 11" "mhpath: message 11 out of range 1-10"
 run_test "mhpath 10 11" "mhpath: message 11 out of range 1-10"
 
 # check range with message number greater than highest
+start_test "range with message number greater than highest"
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/2
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/2
@@ -88,9 +96,11 @@ run_prog mhpath 1-99999 > $actual 2>&1
 check $expected $actual
 
 # check new
 check $expected $actual
 
 # check new
+start_test "new"
 run_test "mhpath new" "$MH_TEST_DIR/Mail/inbox/11"
 
 # check multiple msgs, including new
 run_test "mhpath new" "$MH_TEST_DIR/Mail/inbox/11"
 
 # check multiple msgs, including new
+start_test "multiple msgs, including new"
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/10
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/10
@@ -100,29 +110,36 @@ 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
+start_test "invalid message list using names"
 run_test "mhpath last-new" "mhpath: bad message list last-new"
 
 # check cur
 run_test "mhpath last-new" "mhpath: bad message list last-new"
 
 # check cur
+start_test "cur"
 folder +inbox 5 > /dev/null
 run_test "mhpath cur" "$MH_TEST_DIR/Mail/inbox/5"
 
 # check prev
 folder +inbox 5 > /dev/null
 run_test "mhpath cur" "$MH_TEST_DIR/Mail/inbox/5"
 
 # check prev
+start_test "prev"
 run_test "mhpath prev" "$MH_TEST_DIR/Mail/inbox/4"
 
 # check next
 run_test "mhpath prev" "$MH_TEST_DIR/Mail/inbox/4"
 
 # check next
+start_test "next"
 run_test "mhpath next" "$MH_TEST_DIR/Mail/inbox/6"
 
 # check invalid message list using numbers
 run_test "mhpath next" "$MH_TEST_DIR/Mail/inbox/6"
 
 # check invalid message list using numbers
+start_test "invalid message list using numbers"
 rmm 1-2
 run_test "mhpath 1-2" "mhpath: no messages in range 1-2"
 
 # check ignoring of out-of-range message numbers in ranges
 rmm 1-2
 run_test "mhpath 1-2" "mhpath: no messages in range 1-2"
 
 # check ignoring of out-of-range message numbers in ranges
+start_test "ignoring of out-of-range message numbers in ranges"
 run_test "mhpath 1-3" "$MH_TEST_DIR/Mail/inbox/3"
 run_test "mhpath first-3" "$MH_TEST_DIR/Mail/inbox/3"
 run_test "mhpath 10-11" "$MH_TEST_DIR/Mail/inbox/10"
 run_test "mhpath last-11" "$MH_TEST_DIR/Mail/inbox/10"
 
 # check reference to existing messages
 run_test "mhpath 1-3" "$MH_TEST_DIR/Mail/inbox/3"
 run_test "mhpath first-3" "$MH_TEST_DIR/Mail/inbox/3"
 run_test "mhpath 10-11" "$MH_TEST_DIR/Mail/inbox/10"
 run_test "mhpath last-11" "$MH_TEST_DIR/Mail/inbox/10"
 
 # check reference to existing messages
+start_test "reference to existing messages"
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/3
 $MH_TEST_DIR/Mail/inbox/4
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/3
 $MH_TEST_DIR/Mail/inbox/4
@@ -131,6 +148,7 @@ run_prog mhpath first:2 > $actual 2>&1
 check $expected $actual
 
 # check reference to non-existent messages
 check $expected $actual
 
 # check reference to non-existent messages
+start_test "reference to non-existent messages"
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/2
 cat > $expected <<EOF
 $MH_TEST_DIR/Mail/inbox/1
 $MH_TEST_DIR/Mail/inbox/2
@@ -139,4 +157,5 @@ run_prog mhpath 1 2 > $actual 2>&1
 check $expected $actual
 
 
 check $expected $actual
 
 
+finish_test
 exit $failed
 exit $failed
index ca1e7cd62e43d87644752c54beffc2d6ddad42ec..fcd83dadabc0b6bbd115d96bb27fb2804b444a1b 100755 (executable)
@@ -21,6 +21,7 @@ expected="$MH_TEST_DIR/$$.expected"
 actual="$MH_TEST_DIR/$$.actual"
 
 # check a boundary condition in m_getfld():  its internal message
 actual="$MH_TEST_DIR/$$.actual"
 
 # check a boundary condition in m_getfld():  its internal message
+start_test "a boundary condition in m_getfld():  its internal message"
 # buffer holds exactly up to the end of a header field body in a
 # message part
 msgfile=`mhpath new`
 # buffer holds exactly up to the end of a header field body in a
 # message part
 msgfile=`mhpath new`
@@ -162,6 +163,7 @@ run_prog mhshow -part 1.1 -form mhl.null $msgnum >"$actual" 2>&1
 check "$expected" "$actual" : check number 1
 
 # check a boundary condition in m_getfld():  its internal message
 check "$expected" "$actual" : check number 1
 
 # check a boundary condition in m_getfld():  its internal message
+start_test "a boundary condition in m_getfld():  its internal message"
 # buffer holds exactly up to the end of a header field name in a
 # message part
 msgfile=`mhpath new`
 # buffer holds exactly up to the end of a header field name in a
 # message part
 msgfile=`mhpath new`
@@ -303,6 +305,7 @@ run_prog mhshow -part 1.1 -form mhl.null $msgnum >"$actual" 2>&1
 check "$expected" "$actual" : check number 2
 
 # check a boundary condition in m_getfld():  its internal message
 check "$expected" "$actual" : check number 2
 
 # check a boundary condition in m_getfld():  its internal message
+start_test "a boundary condition in m_getfld():  its internal message"
 # buffer holds exactly up to the end of a message part boundary
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 # buffer holds exactly up to the end of a message part boundary
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
@@ -445,4 +448,5 @@ run_prog mhshow -part 1.1 -form mhl.null $msgnum >"$actual" 2>&1
 check "$expected" "$actual" : check number 3
 
 
 check "$expected" "$actual" : check number 3
 
 
+finish_test
 exit $failed
 exit $failed
index e0b154b9e859ee9a51d0724fac731bbcef474b7c..c2e78022483ee5eb713beacd933feb4874fd16de 100755 (executable)
@@ -26,6 +26,7 @@ expected="$MH_TEST_DIR"/$$.expected
 actual="$MH_TEST_DIR"/$$.actual
 
 # check charset conversion
 actual="$MH_TEST_DIR"/$$.actual
 
 # check charset conversion
+start_test "charset conversion"
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
@@ -62,6 +63,7 @@ EOF
 
 
 # check expansion of %{charset} by itself
 
 
 # check expansion of %{charset} by itself
+start_test "expansion of %{charset} by itself"
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
@@ -93,6 +95,7 @@ check "$expected" "$actual" : check %{charset} by itself
 
 
 # check expansion of empty %{charset} by itself
 
 
 # check expansion of empty %{charset} by itself
+start_test "expansion of empty %{charset} by itself"
 msgfile=`mhpath new`
 omsgnum=$msgnum
 msgnum=`basename $msgfile`
 msgfile=`mhpath new`
 omsgnum=$msgnum
 msgnum=`basename $msgfile`
@@ -131,6 +134,7 @@ mhshow-show-text/plain: charset=%{charset}; echo ${charset:+-I $charset}
 EOF
 
 # check expansion of embedded %{charset} with no text following
 EOF
 
 # check expansion of embedded %{charset} with no text following
+start_test "expansion of embedded %{charset} with no text following"
 cat >"$expected" <<EOF
 [ Message inbox:$omsgnum ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
 cat >"$expected" <<EOF
 [ Message inbox:$omsgnum ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
@@ -148,6 +152,7 @@ check "$expected" "$actual" : check embedded %{charset} with no text
 
 
 # check expansion of empty embedded %{charset} with no text following
 
 
 # check expansion of empty embedded %{charset} with no text following
+start_test "expansion of empty embedded %{charset} with no text following"
 cat >"$expected" <<EOF
 [ Message inbox:$msgnum ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
 cat >"$expected" <<EOF
 [ Message inbox:$msgnum ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
@@ -168,6 +173,7 @@ sed -e 's%\(mhshow-show-text/plain:.*\)%\1 file%' "$MH" >"$MH.new"
 mv -f "$MH.new" "$MH"
 
 # check expansion of embedded %{charset} with text following
 mv -f "$MH.new" "$MH"
 
 # check expansion of embedded %{charset} with text following
+start_test "expansion of embedded %{charset} with text following"
 cat >"$expected" <<EOF
 [ Message inbox:$omsgnum ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
 cat >"$expected" <<EOF
 [ Message inbox:$omsgnum ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
@@ -185,6 +191,7 @@ check "$expected" "$actual" : check embedded %{charset} with text following
 
 
 # check expansion of empty embedded %{charset} with text following
 
 
 # check expansion of empty embedded %{charset} with text following
+start_test "expansion of empty embedded %{charset} with text following"
 cat >"$expected" <<EOF
 [ Message inbox:$msgnum ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
 cat >"$expected" <<EOF
 [ Message inbox:$msgnum ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
@@ -205,6 +212,7 @@ sed -e 's/charset/method/g' "$MH" >"$MH.new"
 mv -f "$MH.new" "$MH"
 
 # check parameter value quoting
 mv -f "$MH.new" "$MH"
 
 # check parameter value quoting
+start_test "parameter value quoting"
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
@@ -241,6 +249,7 @@ sed -e 's/method/unknown/g' "$MH" >"$MH.new"
 mv -f "$MH.new" "$MH"
 
 # check that unknown parameter is not expanded
 mv -f "$MH.new" "$MH"
 
 # check that unknown parameter is not expanded
+start_test "that unknown parameter is not expanded"
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
@@ -278,6 +287,7 @@ mhshow-show-text/plain: true '%F' %F
 EOF
 
 # check parameter value quoting with text following
 EOF
 
 # check parameter value quoting with text following
+start_test "parameter value quoting with text following"
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
@@ -306,6 +316,7 @@ run_prog mhshow last >"$actual" 2>&1
 check "$expected" "$actual" : parameter value quoting with text following
 
 # check malicious parameter value quoting
 check "$expected" "$actual" : parameter value quoting with text following
 
 # check malicious parameter value quoting
+start_test "malicious parameter value quoting"
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
 msgfile=`mhpath new`
 msgnum=`basename $msgfile`
 cat >"$msgfile" <<'EOF'
@@ -1194,4 +1205,5 @@ EOF
 run_prog mhshow last >"$actual" 2>&1
 check "$expected" "$actual" : large file conversion to UTF-8
 
 run_prog mhshow last >"$actual" 2>&1
 check "$expected" "$actual" : large file conversion to UTF-8
 
+finish_test
 exit $failed
 exit $failed
index 2ff99f22c6f8367a651547108ab4e2a714b93d4f..aec8baa8e951225a725b58220e6b63885c33a533 100755 (executable)
@@ -29,6 +29,7 @@ cd "$MHTMPDIR"
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 if [ $has_mkstemps -eq 1 ]; then
     cat >$expected <<-'EOF'
        Usage: mkstemp [switches]
 if [ $has_mkstemps -eq 1 ]; then
     cat >$expected <<-'EOF'
        Usage: mkstemp [switches]
@@ -56,6 +57,7 @@ check "$expected" "$actual"
 
 
 # check -version
 
 
 # check -version
+start_test "-version"
 # Verified same behavior as compiled mhmail.
 case `$mkstemp -v` in
     mkstemp\ --*) ;;
 # Verified same behavior as compiled mhmail.
 case `$mkstemp -v` in
     mkstemp\ --*) ;;
@@ -65,6 +67,7 @@ esac
 
 
 # check with no switches
 
 
 # check with no switches
+start_test "with no switches"
 tmpfile=`$mkstemp`
 if [ -f "$tmpfile" ]; then
     rm "$tmpfile"
 tmpfile=`$mkstemp`
 if [ -f "$tmpfile" ]; then
     rm "$tmpfile"
@@ -74,6 +77,7 @@ fi
 
 
 # check -directory
 
 
 # check -directory
+start_test "-directory"
 tmpfile=`$mkstemp -directory "$MHTMPDIR"`
 [ -f "$tmpfile" ]  &&  rm "$tmpfile"  ||  failed=`expr ${failed:-0} + 1`
 # Rely on exit status of grep to detect failure and terminate due to set -e:
 tmpfile=`$mkstemp -directory "$MHTMPDIR"`
 [ -f "$tmpfile" ]  &&  rm "$tmpfile"  ||  failed=`expr ${failed:-0} + 1`
 # Rely on exit status of grep to detect failure and terminate due to set -e:
@@ -82,6 +86,7 @@ run_test 'eval echo $check_tmpfile' ''
 
 
 # check -prefix
 
 
 # check -prefix
+start_test "-prefix"
 tmpfile=`$mkstemp -prefix mkstemptest`
 [ -f "$tmpfile" ]  &&  rm "$tmpfile"  ||  failed=`expr ${failed:-0} + 1`
 # Rely on exit status of grep to detect failure and terminate due to set -e:
 tmpfile=`$mkstemp -prefix mkstemptest`
 [ -f "$tmpfile" ]  &&  rm "$tmpfile"  ||  failed=`expr ${failed:-0} + 1`
 # Rely on exit status of grep to detect failure and terminate due to set -e:
@@ -99,4 +104,5 @@ if [ $has_mkstemps -eq 1 ]; then
 fi
 
 
 fi
 
 
+finish_test
 exit $failed
 exit $failed
index 92c7201057ff0a83ebd753ae0bf95c50263092fe..ff1e72f59a84304c6184e5d9332c6dfc4c847921 100755 (executable)
@@ -42,6 +42,7 @@ QUIT
 EOF
 
 # check invalid -messageid selection
 EOF
 
 # check invalid -messageid selection
+start_test "invalid -messageid selection"
 run_test "send -draft -messageid invalid" \
 "post: unsupported messageid \"invalid\"
 send: message not delivered to anyone"
 run_test "send -draft -messageid invalid" \
 "post: unsupported messageid \"invalid\"
 send: message not delivered to anyone"
@@ -111,6 +112,7 @@ test_messageid ()
 }
 
 # check -messageid localname (the default)
 }
 
 # check -messageid localname (the default)
+start_test "-messageid localname (the default)"
 cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: Somebody Else <somebody@example.com>
 cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: Somebody Else <somebody@example.com>
@@ -136,6 +138,7 @@ EOF
 test_messageid localname "${testname}.expected"
 
 # check -messageid random
 test_messageid localname "${testname}.expected"
 
 # check -messageid random
+start_test "-messageid random"
 cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: Somebody Else <somebody@example.com>
 cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: Somebody Else <somebody@example.com>
@@ -163,4 +166,5 @@ test_messageid random "${testname}.expected"
 
 rm -f ${MHMTSCONF}
 
 
 rm -f ${MHMTSCONF}
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index bd9123ec06b7e0a774b35550d60c4bf374bf8ad9..fbec4bc0d89bdc49ec05a93bd1b4199e600ab8aa 100755 (executable)
@@ -74,6 +74,7 @@ test_alias ()
 
 
 # check blind list
 
 
 # check blind list
+start_test "blind list"
 cat >"${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: blind_list
 cat >"${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: blind_list
@@ -122,6 +123,7 @@ test_post "${testname}.actual" "${testname}.expected" \
   "-alias ${MH_TEST_DIR}/Mail/aliases"
 
 # check named list (alias followed by ;)
   "-alias ${MH_TEST_DIR}/Mail/aliases"
 
 # check named list (alias followed by ;)
+start_test "named list (alias followed by ;)"
 cat >"${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: named.list
 cat >"${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: named.list
@@ -144,6 +146,7 @@ EOF
 test_alias sendmail/smtp "${testname}.expected"
 
 # check blind list with -mts sendmail/pipe, which should fail
 test_alias sendmail/smtp "${testname}.expected"
 
 # check blind list with -mts sendmail/pipe, which should fail
+start_test "blind list with -mts sendmail/pipe, which should fail"
 cat >"${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: blind_list
 cat >"${MH_TEST_DIR}/Mail/draft" <<EOF
 From: Mr Nobody <nobody@example.com>
 To: blind_list
@@ -160,6 +163,7 @@ EOF
 test_alias sendmail/pipe "${testname}.expected"
 
 # check that alias expansion happens in the From: line when doing a bcc
 test_alias sendmail/pipe "${testname}.expected"
 
 # check that alias expansion happens in the From: line when doing a bcc
+start_test "that alias expansion happens in the From: line when doing a bcc"
 cat >"${MH_TEST_DIR}/Mail/draft" <<EOF
 From: four
 To: one
 cat >"${MH_TEST_DIR}/Mail/draft" <<EOF
 From: four
 To: one
@@ -216,4 +220,5 @@ test_post "${testname}.actual" "${testname}.expected" \
   "-alias ${MH_TEST_DIR}/Mail/aliases"
 
 
   "-alias ${MH_TEST_DIR}/Mail/aliases"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 2d1ba24acb44c16d69f7ba74c2a37b5402d8c487..22fbe7fea1465911ddca121897663e9187a2cf99 100755 (executable)
@@ -76,6 +76,7 @@ test_sendfiles ()
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: sendfiles [switches] -to recipient -subject subject file1 [file2 ...]
   or
 cat >"$expected" <<EOF
 Usage: sendfiles [switches] -to recipient -subject subject file1 [file2 ...]
   or
@@ -93,6 +94,7 @@ run_prog sendfiles -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `sendfiles -v` in
   sendfiles\ --*) ;;
   *           ) printf '%s: sendfiles -v generated unexpected output\n' "$0" >&2
 case `sendfiles -v` in
   sendfiles\ --*) ;;
   *           ) printf '%s: sendfiles -v generated unexpected output\n' "$0" >&2
@@ -100,6 +102,7 @@ case `sendfiles -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test 'sendfiles -nonexistent' "Usage: sendfiles [switches] -to recipient \
 -subject subject file1 [file2 ...]
   or
 run_test 'sendfiles -nonexistent' "Usage: sendfiles [switches] -to recipient \
 -subject subject file1 [file2 ...]
   or
@@ -112,6 +115,7 @@ run_test 'sendfiles -nonexistent' "Usage: sendfiles [switches] -to recipient \
   Can use PERSON environment variable instead of -from switch."
 
 # check unknown compression method
   Can use PERSON environment variable instead of -from switch."
 
 # check unknown compression method
+start_test "unknown compression method"
 run_test 'sendfiles -compress unknown to subject file' \
 'sendfiles: unknown compression method "unknown"'"
 Usage: sendfiles [switches] -to recipient \
 run_test 'sendfiles -compress unknown to subject file' \
 'sendfiles: unknown compression method "unknown"'"
 Usage: sendfiles [switches] -to recipient \
@@ -126,6 +130,7 @@ Usage: sendfiles [switches] -to recipient \
   Can use PERSON environment variable instead of -from switch."
 
 # Check basic operation, using specified compression method.
   Can use PERSON environment variable instead of -from switch."
 
 # Check basic operation, using specified compression method.
+start_test "basic operation, using specified compression method."
 # Don't check the mhlist output, by not creating an $expected file,
 # because it will vary with compression method and compressed file
 # size.
 # Don't check the mhlist output, by not creating an $expected file,
 # because it will vary with compression method and compressed file
 # size.
@@ -137,6 +142,7 @@ Usage: sendfiles [switches] -to recipient \
 [ "`findprog lzma`" ]      &&  test_sendfiles 'lzma -cd' new -compress lzma
 
 # check with no compression
 [ "`findprog lzma`" ]      &&  test_sendfiles 'lzma -cd' new -compress lzma
 
 # check with no compression
+start_test "with no compression"
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
@@ -147,6 +153,7 @@ EOF
 test_sendfiles cat new -compress none
 
 # check with no compression, -none
 test_sendfiles cat new -compress none
 
 # check with no compression, -none
+start_test "with no compression, -none"
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
@@ -157,6 +164,7 @@ EOF
 test_sendfiles cat new -none
 
 # check old argument style (without -to and -subject)
 test_sendfiles cat new -none
 
 # check old argument style (without -to and -subject)
+start_test "old argument style (without -to and -subject)"
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
@@ -167,6 +175,7 @@ EOF
 test_sendfiles cat old -compress none
 
 # check -from
 test_sendfiles cat old -compress none
 
 # check -from
+start_test "-from"
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
@@ -177,6 +186,7 @@ EOF
 test_sendfiles cat new -compress none -from 'Sender <sender@example.com>'
 
 # check PERSON environment variable
 test_sendfiles cat new -compress none -from 'Sender <sender@example.com>'
 
 # check PERSON environment variable
+start_test "PERSON environment variable"
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
 cat >"$expected" <<EOF
  msg part  type/subtype              size description
   11       application/octet-stream
@@ -189,4 +199,5 @@ PERSON='Sender <sender@example.com>' test_sendfiles cat new -compress none
 rm -fr "$MH_TEST_DIR/fakesendmail" "$MH_TEST_DIR/$testfile" "$MH_TEST_DIR/tmp"
 
 
 rm -fr "$MH_TEST_DIR/fakesendmail" "$MH_TEST_DIR/$testfile" "$MH_TEST_DIR/tmp"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 43739b7401c26873e58eddf45b7b1963399557de..3427790a872fb6bb30b73fb9105b801829516e88 100755 (executable)
@@ -25,6 +25,7 @@ actual_err=$MH_TEST_DIR/$$.actual_err
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >$expected <<EOF
 Usage: prompter [switches] file
   switches are:
 cat >$expected <<EOF
 Usage: prompter [switches] file
   switches are:
@@ -42,6 +43,7 @@ run_prog prompter -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `prompter -v` in
   prompter\ --*) ;;
   *            ) printf '%s: prompter -v generated unexpected output\n' "$0" >&2
 case `prompter -v` in
   prompter\ --*) ;;
   *            ) printf '%s: prompter -v generated unexpected output\n' "$0" >&2
@@ -49,13 +51,16 @@ case `prompter -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test 'prompter -nonexistent' 'prompter: -nonexistent unknown'
 
 
 # check with no switches
 run_test 'prompter -nonexistent' 'prompter: -nonexistent unknown'
 
 
 # check with no switches
+start_test "with no switches"
 run_test 'prompter' 'prompter: usage: prompter [switches] file'
 
 # check with file
 run_test 'prompter' 'prompter: usage: prompter [switches] file'
 
 # check with file
+start_test "with file"
 cat >$expected <<EOF
 Resent-From: sender@example.com
 Resent-To: recipient@example.com
 cat >$expected <<EOF
 Resent-From: sender@example.com
 Resent-To: recipient@example.com
@@ -78,6 +83,7 @@ printf 'recipient@example.com\ncc@example.com\n+outbox\nmessage body\n' | \
 check "$expected" "$MH_TEST_DIR/prompter-file" 'keep first'
 
 # check -doteof
 check "$expected" "$MH_TEST_DIR/prompter-file" 'keep first'
 
 # check -doteof
+start_test "-doteof"
 cat >$MH_TEST_DIR/prompter-file <<EOF
 Resent-From: sender@example.com
 Resent-To:
 cat >$MH_TEST_DIR/prompter-file <<EOF
 Resent-From: sender@example.com
 Resent-To:
@@ -91,6 +97,7 @@ printf 'recipient@example.com\ncc@example.com\n+outbox\nmessage body\n.\n' | \
 check "$expected" "$MH_TEST_DIR/prompter-file" 'keep first'
 
 # check -nodoteof
 check "$expected" "$MH_TEST_DIR/prompter-file" 'keep first'
 
 # check -nodoteof
+start_test "-nodoteof"
 cat >$MH_TEST_DIR/prompter-file <<EOF
 Resent-From: sender@example.com
 Resent-To:
 cat >$MH_TEST_DIR/prompter-file <<EOF
 Resent-From: sender@example.com
 Resent-To:
@@ -104,6 +111,7 @@ printf 'recipient@example.com\ncc@example.com\n+outbox\nmessage body\n' | \
 check "$expected" "$MH_TEST_DIR/prompter-file" 'keep first'
 
 # check -noprepend
 check "$expected" "$MH_TEST_DIR/prompter-file" 'keep first'
 
 # check -noprepend
+start_test "-noprepend"
 cat >$MH_TEST_DIR/prompter-file <<EOF
 Resent-From: sender@example.com
 Resent-To:
 cat >$MH_TEST_DIR/prompter-file <<EOF
 Resent-From: sender@example.com
 Resent-To:
@@ -121,6 +129,7 @@ printf 'recipient@example.com\ncc@example.com\n+outbox\nappendage\n' | \
 check "$expected" "$MH_TEST_DIR/prompter-file"
 
 # check -prepend
 check "$expected" "$MH_TEST_DIR/prompter-file"
 
 # check -prepend
+start_test "-prepend"
 cat >$MH_TEST_DIR/prompter-file <<EOF
 Resent-From: sender@example.com
 Resent-To:
 cat >$MH_TEST_DIR/prompter-file <<EOF
 Resent-From: sender@example.com
 Resent-To:
@@ -146,6 +155,7 @@ printf 'recipient@example.com\ncc@example.com\n+outbox\nprependage\n' | \
 check "$MH_TEST_DIR/prompter-file" "$expected" 'keep first'
 
 # check -rapid
 check "$MH_TEST_DIR/prompter-file" "$expected" 'keep first'
 
 # check -rapid
+start_test "-rapid"
 cat >$expected <<EOF
 Resent-From: sender@example.com
 Resent-To: recipient@example.com
 cat >$expected <<EOF
 Resent-From: sender@example.com
 Resent-To: recipient@example.com
@@ -162,6 +172,7 @@ run_prog prompter -rapid $MH_TEST_DIR/prompter-file >"$actual" </dev/null
 check "$expected" "$actual"
 
 # check -norapid
 check "$expected" "$actual"
 
 # check -norapid
+start_test "-norapid"
 cat >$expected <<EOF
 Resent-From: sender@example.com
 Resent-To: recipient@example.com
 cat >$expected <<EOF
 Resent-From: sender@example.com
 Resent-To: recipient@example.com
@@ -181,6 +192,7 @@ run_prog prompter -rapid -norapid $MH_TEST_DIR/prompter-file \
 check "$expected" "$actual"
 
 # check -erase and -kill.  We can't test their effects because they
 check "$expected" "$actual"
 
 # check -erase and -kill.  We can't test their effects because they
+start_test "-erase and -kill.  We can't test their effects because they"
 # only affect the terminal and this test execution might not be
 # connected to one.  So we can just check that the respective options
 # were set.
 # only affect the terminal and this test execution might not be
 # connected to one.  So we can just check that the respective options
 # were set.
@@ -204,6 +216,7 @@ printf 'woot woot\n' | \
 check "$expected" "$actual"
 
 # check -body.  It's undocumented but the default, so make sure that
 check "$expected" "$actual"
 
 # check -body.  It's undocumented but the default, so make sure that
+start_test "-body.  It's undocumented but the default, so make sure that"
 # it reverses the effect of -nobody.
 cat >$expected <<EOF
 Resent-From: sender@example.com
 # it reverses the effect of -nobody.
 cat >$expected <<EOF
 Resent-From: sender@example.com
@@ -225,6 +238,7 @@ run_prog prompter -nobody -body $MH_TEST_DIR/prompter-file >"$actual" \
 check "$expected" "$actual"
 
 # check -nobody.  It's undocumented but looks like it removes the body.
 check "$expected" "$actual"
 
 # check -nobody.  It's undocumented but looks like it removes the body.
+start_test "-nobody.  It's undocumented but looks like it removes the body."
 cat >$expected <<EOF
 Resent-From: sender@example.com
 Resent-To: recipient@example.com
 cat >$expected <<EOF
 Resent-From: sender@example.com
 Resent-To: recipient@example.com
@@ -237,4 +251,5 @@ run_prog prompter -nobody $MH_TEST_DIR/prompter-file >/dev/null
 check "$expected" "$MH_TEST_DIR/prompter-file"
 
 
 check "$expected" "$MH_TEST_DIR/prompter-file"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index ebae2286f8f99b62fe42023fb1faac221f5539b6..d52361bad7ab0b21988db1c6189c4b216d445a7f 100755 (executable)
@@ -26,6 +26,7 @@ actual="$MH_TEST_DIR/$$.actual"
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: rcvpack [switches] file
   switches are:
 cat >"$expected" <<EOF
 Usage: rcvpack [switches] file
   switches are:
@@ -40,6 +41,7 @@ run_prog "$rcvpack" -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `$rcvpack -v` in
   rcvpack\ --*) ;;
   *           ) printf '%s: rcvpack -v generated unexpected output\n' "$0" >&2
 case `$rcvpack -v` in
   rcvpack\ --*) ;;
   *           ) printf '%s: rcvpack -v generated unexpected output\n' "$0" >&2
@@ -47,17 +49,21 @@ case `$rcvpack -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test "$rcvpack -nonexistent" 'rcvpack: -nonexistent unknown'
 
 # check with no switches
 run_test "$rcvpack -nonexistent" 'rcvpack: -nonexistent unknown'
 
 # check with no switches
+start_test "with no switches"
 run_test "$rcvpack" 'rcvpack: rcvpack [switches] file'
 
 # check mbox creation
 run_test "$rcvpack" 'rcvpack: rcvpack [switches] file'
 
 # check mbox creation
+start_test "mbox creation"
 run_prog $rcvpack <${MH_TEST_DIR}/Mail/inbox/1 ${MH_TEST_DIR}/Mail/mbox
 inc -file ${MH_TEST_DIR}/Mail/mbox -silent
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -mbox
 run_prog $rcvpack <${MH_TEST_DIR}/Mail/inbox/1 ${MH_TEST_DIR}/Mail/mbox
 inc -file ${MH_TEST_DIR}/Mail/mbox -silent
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -mbox
+start_test "-mbox"
 run_prog $rcvpack -mmdf -mbox ${MH_TEST_DIR}/Mail/mbox2 \
   <${MH_TEST_DIR}/Mail/inbox/1
 # Filter out "From " lines because their timestamps can differ by a second.
 run_prog $rcvpack -mmdf -mbox ${MH_TEST_DIR}/Mail/mbox2 \
   <${MH_TEST_DIR}/Mail/inbox/1
 # Filter out "From " lines because their timestamps can differ by a second.
@@ -66,19 +72,23 @@ grep -v '^From ' "${MH_TEST_DIR}/Mail/mbox2" >"${MH_TEST_DIR}/Mail/mbox2-filt"
 check "${MH_TEST_DIR}/Mail/mbox-filt" "${MH_TEST_DIR}/Mail/mbox2-filt"
 
 # check append to existing mbox file
 check "${MH_TEST_DIR}/Mail/mbox-filt" "${MH_TEST_DIR}/Mail/mbox2-filt"
 
 # check append to existing mbox file
+start_test "append to existing mbox file"
 run_prog $rcvpack <${MH_TEST_DIR}/Mail/inbox/2 ${MH_TEST_DIR}/Mail/mbox
 inc -file ${MH_TEST_DIR}/Mail/mbox -silent
 check "${MH_TEST_DIR}/Mail/inbox/2" "${MH_TEST_DIR}/Mail/inbox/12" 'keep first'
 
 # check -mmdf
 run_prog $rcvpack <${MH_TEST_DIR}/Mail/inbox/2 ${MH_TEST_DIR}/Mail/mbox
 inc -file ${MH_TEST_DIR}/Mail/mbox -silent
 check "${MH_TEST_DIR}/Mail/inbox/2" "${MH_TEST_DIR}/Mail/inbox/12" 'keep first'
 
 # check -mmdf
+start_test "-mmdf"
 run_prog $rcvpack -mmdf <${MH_TEST_DIR}/Mail/inbox/3 ${MH_TEST_DIR}/Mail/mmdf
 inc -file ${MH_TEST_DIR}/Mail/mmdf -silent
 check "${MH_TEST_DIR}/Mail/inbox/3" "${MH_TEST_DIR}/Mail/inbox/12" 'keep first'
 
 # check append to existing mmdf file
 run_prog $rcvpack -mmdf <${MH_TEST_DIR}/Mail/inbox/3 ${MH_TEST_DIR}/Mail/mmdf
 inc -file ${MH_TEST_DIR}/Mail/mmdf -silent
 check "${MH_TEST_DIR}/Mail/inbox/3" "${MH_TEST_DIR}/Mail/inbox/12" 'keep first'
 
 # check append to existing mmdf file
+start_test "append to existing mmdf file"
 run_prog $rcvpack -mmdf <${MH_TEST_DIR}/Mail/inbox/4 ${MH_TEST_DIR}/Mail/mmdf
 inc -file ${MH_TEST_DIR}/Mail/mmdf -silent
 check "${MH_TEST_DIR}/Mail/inbox/4" "${MH_TEST_DIR}/Mail/inbox/13" 'keep first'
 
 
 run_prog $rcvpack -mmdf <${MH_TEST_DIR}/Mail/inbox/4 ${MH_TEST_DIR}/Mail/mmdf
 inc -file ${MH_TEST_DIR}/Mail/mmdf -silent
 check "${MH_TEST_DIR}/Mail/inbox/4" "${MH_TEST_DIR}/Mail/inbox/13" 'keep first'
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index d2844df0368cb2f9fbca205d453581808e3196c3..392502099b1bccb1cdc132777494c62ba768f113 100755 (executable)
@@ -28,6 +28,7 @@ actual_err=$MH_TEST_DIR/$$.actual_err
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >$expected <<EOF
 Usage: rcvstore [+folder] [switches]
   switches are:
 cat >$expected <<EOF
 Usage: rcvstore [+folder] [switches]
   switches are:
@@ -45,6 +46,7 @@ run_prog "$rcvstore" -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `$rcvstore -v` in
   rcvstore\ --*) ;;
   *            ) printf '%s: rcvstore -v generated unexpected output\n' "$0" >&2
 case `$rcvstore -v` in
   rcvstore\ --*) ;;
   *            ) printf '%s: rcvstore -v generated unexpected output\n' "$0" >&2
@@ -52,9 +54,11 @@ case `$rcvstore -v` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test "$rcvstore -nonexistent" 'rcvstore: -nonexistent unknown'
 
 # check with no switches and zero-length input message
 run_test "$rcvstore -nonexistent" 'rcvstore: -nonexistent unknown'
 
 # check with no switches and zero-length input message
+start_test "with no switches and zero-length input message"
 cat >$expected <<EOF
 rcvstore: empty file
 EOF
 cat >$expected <<EOF
 rcvstore: empty file
 EOF
@@ -63,6 +67,7 @@ run_prog $rcvstore </dev/null >$actual 2>&1
 check $expected $actual
 
 # check with no switches
 check $expected $actual
 
 # check with no switches
+start_test "with no switches"
 cat >$expected <<EOF
 EOF
 run_prog $rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 cat >$expected <<EOF
 EOF
 run_prog $rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
@@ -70,11 +75,13 @@ check $expected $actual 'keep first'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check + of existing folder
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check + of existing folder
+start_test "+ of existing folder"
 run_prog $rcvstore +inbox <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check + of new folder
 run_prog $rcvstore +inbox <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check + of new folder
+start_test "+ of new folder"
 run_prog $rcvstore +newfolder <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/newfolder/1" \
 run_prog $rcvstore +newfolder <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/newfolder/1" \
@@ -82,6 +89,7 @@ check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/newfolder/1" \
 rmdir "${MH_TEST_DIR}/Mail/newfolder"
 
 # check -nocreate
 rmdir "${MH_TEST_DIR}/Mail/newfolder"
 
 # check -nocreate
+start_test "-nocreate"
 cat >$expected_err <<EOF
 rcvstore: folder ${MH_TEST_DIR}/Mail/newfolder doesn't exist
 EOF
 cat >$expected_err <<EOF
 rcvstore: folder ${MH_TEST_DIR}/Mail/newfolder doesn't exist
 EOF
@@ -94,6 +102,7 @@ check $expected $actual 'keep first'
 check $expected_err $actual_err
 
 # check -create
 check $expected_err $actual_err
 
 # check -create
+start_test "-create"
 run_prog $rcvstore +newfolder -nocreate -create <${MH_TEST_DIR}/Mail/inbox/1 \
   >$actual 2>&1
 check $expected $actual 'keep first'
 run_prog $rcvstore +newfolder -nocreate -create <${MH_TEST_DIR}/Mail/inbox/1 \
   >$actual 2>&1
 check $expected $actual 'keep first'
@@ -102,6 +111,7 @@ check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/newfolder/1" \
 rmdir "${MH_TEST_DIR}/Mail/newfolder"
 
 # check addition to unseen sequence
 rmdir "${MH_TEST_DIR}/Mail/newfolder"
 
 # check addition to unseen sequence
+start_test "addition to unseen sequence"
 printf 'Unseen-Sequence: unseen\n' >> $MH
 run_prog $rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 printf 'Unseen-Sequence: unseen\n' >> $MH
 run_prog $rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
@@ -112,24 +122,28 @@ touch "${MH_TEST_DIR}/Mail/inbox/11"
 rmm 11
 
 # check -nounseen
 rmm 11
 
 # check -nounseen
+start_test "-nounseen"
 run_prog $rcvstore -nounseen <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_test 'mark -sequence unseen -list' 'unseen: '
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -unseen
 run_prog $rcvstore -nounseen <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_test 'mark -sequence unseen -list' 'unseen: '
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -unseen
+start_test "-unseen"
 run_prog $rcvstore -nounseen -unseen <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_test 'mark -sequence unseen -list' 'unseen: 11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -sequence
 run_prog $rcvstore -nounseen -unseen <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_test 'mark -sequence unseen -list' 'unseen: 11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -sequence
+start_test "-sequence"
 run_prog $rcvstore -sequence newseq <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_test 'mark -sequence newseq -list' 'newseq: 11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check that default is -nozero
 run_prog $rcvstore -sequence newseq <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_test 'mark -sequence newseq -list' 'newseq: 11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check that default is -nozero
+start_test "that default is -nozero"
 mark -sequence newseq all
 run_prog $rcvstore -sequence newseq <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 mark -sequence newseq all
 run_prog $rcvstore -sequence newseq <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
@@ -137,6 +151,7 @@ run_test 'mark -sequence newseq -list' 'newseq: 1-11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -zero
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -zero
+start_test "-zero"
 mark -sequence newseq all
 run_prog $rcvstore -sequence newseq -zero \
   <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 mark -sequence newseq all
 run_prog $rcvstore -sequence newseq -zero \
   <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
@@ -145,6 +160,7 @@ run_test 'mark -sequence newseq -list' 'newseq: 11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -nozero
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -nozero
+start_test "-nozero"
 mark -sequence newseq all
 run_prog $rcvstore -seq newseq -zero -nozero \
   <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 mark -sequence newseq all
 run_prog $rcvstore -seq newseq -zero -nozero \
   <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
@@ -153,12 +169,14 @@ run_test 'mark -sequence newseq -list' 'newseq: 1-11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check that default is -public
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check that default is -public
+start_test "that default is -public"
 run_prog $rcvstore -sequence pubseq <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_test 'mark -sequence pubseq -list' 'pubseq: 11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -nopublic
 run_prog $rcvstore -sequence pubseq <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_test 'mark -sequence pubseq -list' 'pubseq: 11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -nopublic
+start_test "-nopublic"
 run_prog $rcvstore -sequence privseq -nopublic \
   <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_prog $rcvstore -sequence privseq -nopublic \
   <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
@@ -166,6 +184,7 @@ run_test 'mark -sequence privseq -nopublic -list' 'privseq (private): 11'
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -public
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check -public
+start_test "-public"
 run_prog $rcvstore -sequence pubseq -nopublic -public \
   <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 run_prog $rcvstore -sequence pubseq -nopublic -public \
   <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
@@ -189,6 +208,7 @@ fi
 rm -f ${MH_TEST_DIR}/Mail/test-read-perms
 
 # check default Msg-Protect
 rm -f ${MH_TEST_DIR}/Mail/test-read-perms
 
 # check default Msg-Protect
+start_test "default Msg-Protect"
 msgprot=`mhparam msgprot`
 run_prog $rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
 msgprot=`mhparam msgprot`
 run_prog $rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 check $expected $actual 'keep first'
@@ -197,6 +217,7 @@ run_test "find ${MH_TEST_DIR}/Mail/inbox/11 -perm $msgprot" \
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check Msg-Protect profile entry
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first'
 
 # check Msg-Protect profile entry
+start_test "Msg-Protect profile entry"
 msgprot=640
 printf 'Msg-Protect: %s\n' "$msgprot" >>$MH
 run_prog $rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
 msgprot=640
 printf 'Msg-Protect: %s\n' "$msgprot" >>$MH
 run_prog $rcvstore <${MH_TEST_DIR}/Mail/inbox/1 >$actual 2>&1
@@ -206,4 +227,5 @@ run_test "find ${MH_TEST_DIR}/Mail/inbox/11 -perm $msgprot" \
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11"
 
 
 check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index fdc74d44649545708d131b0aad9abb2ad598e06a..d86b8dbf606bbf5b3b822450b57446d08ac2e147 100755 (executable)
@@ -26,6 +26,7 @@ actual="$MH_TEST_DIR/$$.actual"
 
 
 # check -help
 
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: rcvtty [command ...]
   switches are:
 cat >"$expected" <<EOF
 Usage: rcvtty [command ...]
   switches are:
@@ -44,6 +45,7 @@ run_prog "$rcvtty" -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `$rcvtty -v` in
   rcvtty\ --*) ;;
   *          ) printf '%s: rcvtty -v generated unexpected output\n' "$0" >&2
 case `$rcvtty -v` in
   rcvtty\ --*) ;;
   *          ) printf '%s: rcvtty -v generated unexpected output\n' "$0" >&2
@@ -51,6 +53,7 @@ case `$rcvtty -v` in
 esac
 
 # check normal operation.  Use -biff to avoid sending notification to
 esac
 
 # check normal operation.  Use -biff to avoid sending notification to
+start_test "normal operation.  Use -biff to avoid sending notification to"
 # each of the user's terminals.  So this command shouldn't do
 # anything.  It will write the notification(s) if the user actually
 # has actually enabled biff notification, or has set the exec bit of
 # each of the user's terminals.  So this command shouldn't do
 # anything.  It will write the notification(s) if the user actually
 # has actually enabled biff notification, or has set the exec bit of
@@ -61,4 +64,5 @@ run_prog $rcvtty <${MH_TEST_DIR}/Mail/inbox/1 -biff >"$actual" 2>&1
 check "$expected" "$actual"
 
 
 check "$expected" "$actual"
 
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 6be4874ca93382d24cb0fab42cd8d4cf65670cdf..d748ee0d372d83e7083b7fe5129397414264b6bf 100755 (executable)
@@ -27,9 +27,11 @@ run_prog folder -create +other -fast >/dev/null
 run_prog folder -create +another -fast >/dev/null
 
 # check with no options and no current message
 run_prog folder -create +another -fast >/dev/null
 
 # check with no options and no current message
+start_test "with no options and no current message"
 run_test 'refile' 'refile: no folder specified'
 
 # check with current message
 run_test 'refile' 'refile: no folder specified'
 
 # check with current message
+start_test "with current message"
 run_prog folder +inbox 4 >/dev/null
 run_test 'refile +other' ''
 run_test 'folders -noheader' \
 run_prog folder +inbox 4 >/dev/null
 run_test 'refile +other' ''
 run_test 'folders -noheader' \
@@ -40,6 +42,7 @@ other    has  1 message   (1- 1).
 TOTAL = 10 messages in 3 folders.'
 
 # check with specified message
 TOTAL = 10 messages in 3 folders.'
 
 # check with specified message
+start_test "with specified message"
 run_prog folder +inbox 5 >/dev/null
 run_test 'refile 5 +other' ''
 run_test 'folders -noheader' \
 run_prog folder +inbox 5 >/dev/null
 run_test 'refile 5 +other' ''
 run_test 'folders -noheader' \
@@ -50,6 +53,7 @@ other    has  2 messages  (1- 2).
 TOTAL = 10 messages in 3 folders.'
 
 # check multiple messages
 TOTAL = 10 messages in 3 folders.'
 
 # check multiple messages
+start_test "multiple messages"
 run_test 'refile 6 7 +other' ''
 run_test 'folders -noheader' \
 'another  has no messages.
 run_test 'refile 6 7 +other' ''
 run_test 'folders -noheader' \
 'another  has no messages.
@@ -59,6 +63,7 @@ other    has  4 messages  (1- 4).
 TOTAL = 10 messages in 3 folders.'
 
 # check multiple folders
 TOTAL = 10 messages in 3 folders.'
 
 # check multiple folders
+start_test "multiple folders"
 run_test 'refile 8 +other +another' ''
 run_test 'folders -noheader' \
 'another  has 1 message   (1- 1).
 run_test 'refile 8 +other +another' ''
 run_test 'folders -noheader' \
 'another  has 1 message   (1- 1).
@@ -68,10 +73,12 @@ other    has 5 messages  (1- 5).
 TOTAL = 11 messages in 3 folders.'
 
 # check message number greater than highest
 TOTAL = 11 messages in 3 folders.'
 
 # check message number greater than highest
+start_test "message number greater than highest"
 run_test 'refile 11 +other' "refile: message 11 doesn't exist"
 run_prog folder -f +another >/dev/null
 
 # check -src
 run_test 'refile 11 +other' "refile: message 11 doesn't exist"
 run_prog folder -f +another >/dev/null
 
 # check -src
+start_test "-src"
 run_test 'refile 9 -src +inbox +other' ''
 run_test 'folders -noheader' \
 'another  has 1 message   (1- 1).
 run_test 'refile 9 -src +inbox +other' ''
 run_test 'folders -noheader' \
 'another  has 1 message   (1- 1).
@@ -81,6 +88,7 @@ other    has 6 messages  (1- 6).
 TOTAL = 11 messages in 3 folders.'
 
 # check -file
 TOTAL = 11 messages in 3 folders.'
 
 # check -file
+start_test "-file"
 run_test "refile -file $MH_TEST_DIR/Mail/inbox/10 +other" ''
 run_test 'folders -noheader' \
 'another  has 1 message   (1-1).
 run_test "refile -file $MH_TEST_DIR/Mail/inbox/10 +other" ''
 run_test 'folders -noheader' \
 'another  has 1 message   (1-1).
@@ -90,6 +98,7 @@ other    has 7 messages  (1-7).
 TOTAL = 11 messages in 3 folders.'
 
 # check -file -, which isn't supported
 TOTAL = 11 messages in 3 folders.'
 
 # check -file -, which isn't supported
+start_test "-file -, which isn't supported"
 run_test "refile -file - +other <$MH_TEST_DIR/Mail/inbox/9" \
          'refile: missing argument to -file'
 run_test 'folders -noheader' \
 run_test "refile -file - +other <$MH_TEST_DIR/Mail/inbox/9" \
          'refile: missing argument to -file'
 run_test 'folders -noheader' \
@@ -108,6 +117,7 @@ other+   has no messages.
 TOTAL = 11 messages in 3 folders.'
 
 # check -draft
 TOTAL = 11 messages in 3 folders.'
 
 # check -draft
+start_test "-draft"
 mv $MH_TEST_DIR/Mail/another/1 $MH_TEST_DIR/Mail/draft
 rmdir $MH_TEST_DIR/Mail/another
 run_test 'refile -draft +other' ''
 mv $MH_TEST_DIR/Mail/another/1 $MH_TEST_DIR/Mail/draft
 rmdir $MH_TEST_DIR/Mail/another
 run_test 'refile -draft +other' ''
@@ -138,6 +148,7 @@ else
 fi
 
 # check -nolink
 fi
 
 # check -nolink
+start_test "-nolink"
 run_test 'refile 7 +other -link -nolink' ''
 run_test 'folders -noheader' \
 'inbox+ has 9 messages  (1-10); cur=7.
 run_test 'refile 7 +other -link -nolink' ''
 run_test 'folders -noheader' \
 'inbox+ has 9 messages  (1-10); cur=7.
@@ -148,6 +159,7 @@ TOTAL = 12 messages in 2 folders.'
 run_test 'scan +inbox 7' "scan: message 7 doesn't exist"
 
 # check -preserve
 run_test 'scan +inbox 7' "scan: message 7 doesn't exist"
 
 # check -preserve
+start_test "-preserve"
 run_test 'refile 10 +other -preserve' ''
 run_test 'folders -noheader' \
 'inbox+ has 8 messages  (1- 9).
 run_test 'refile 10 +other -preserve' ''
 run_test 'folders -noheader' \
 'inbox+ has 8 messages  (1- 9).
@@ -158,6 +170,7 @@ run_test 'scan +other last -format %(msg):%(decode{subject})' \
          '10:Testing message 10'
 
 # check -nopreserve
          '10:Testing message 10'
 
 # check -nopreserve
+start_test "-nopreserve"
 run_test 'refile 9 -src +inbox +other -preserve -nopreserve' ''
 run_test 'folders -noheader' \
 'inbox+ has 7 messages  (1- 8).
 run_test 'refile 9 -src +inbox +other -preserve -nopreserve' ''
 run_test 'folders -noheader' \
 'inbox+ has 7 messages  (1- 8).
@@ -170,6 +183,7 @@ run_test 'scan +other last -format %(msg):%(decode{subject})' \
 sbackup="`mhparam sbackup`"
 
 # check -unlink
 sbackup="`mhparam sbackup`"
 
 # check -unlink
+start_test "-unlink"
 run_test 'refile 3 -src +inbox +other -unlink' ''
 run_test 'folders -noheader' \
 'inbox+ has 6 messages  (1- 8); cur=3.
 run_test 'refile 3 -src +inbox +other -unlink' ''
 run_test 'folders -noheader' \
 'inbox+ has 6 messages  (1- 8); cur=3.
@@ -182,6 +196,7 @@ if test -f "$MH_TEST_DIR/Mail/inbox/${sbackup}3"; then
 fi
 
 # check -nounlink
 fi
 
 # check -nounlink
+start_test "-nounlink"
 run_test 'refile 2 +other -unlink -nounlink' ''
 run_test 'folders -noheader' \
 'inbox+ has 5 messages  (1- 8); cur=2.
 run_test 'refile 2 +other -unlink -nounlink' ''
 run_test 'folders -noheader' \
 'inbox+ has 5 messages  (1- 8); cur=2.
@@ -196,6 +211,7 @@ else
 fi
 
 # test folder creation when stdin is not a tty
 fi
 
 # test folder creation when stdin is not a tty
+start_test "folder creation when stdin is not a tty"
 refile first +newfolder </dev/null
 run_test 'folders -noheader' \
 'inbox+     has 4 messages  (4- 8).
 refile first +newfolder </dev/null
 run_test 'folders -noheader' \
 'inbox+     has 4 messages  (4- 8).
@@ -205,6 +221,7 @@ other      has 7 messages  (1-13).
 TOTAL = 12 messages in 3 folders.'
 
 # test -rmmproc
 TOTAL = 12 messages in 3 folders.'
 
 # test -rmmproc
+start_test "-rmmproc"
 run_test 'refile first +other -rmmproc echo' '4'
 run_test 'folders -noheader' \
 'inbox+     has 4 messages  (4- 8); cur=4.
 run_test 'refile first +other -rmmproc echo' '4'
 run_test 'folders -noheader' \
 'inbox+     has 4 messages  (4- 8); cur=4.
@@ -214,6 +231,7 @@ other      has 8 messages  (1-14).
 TOTAL = 13 messages in 3 folders.'
 
 # test -normmproc
 TOTAL = 13 messages in 3 folders.'
 
 # test -normmproc
+start_test "-normmproc"
 run_test 'refile first +other -rmmproc echo -normmproc' ''
 run_test 'folders -noheader' \
 'inbox+     has 3 messages  (5- 8).
 run_test 'refile first +other -rmmproc echo -normmproc' ''
 run_test 'folders -noheader' \
 'inbox+     has 3 messages  (5- 8).
@@ -223,6 +241,7 @@ other      has 9 messages  (1-15).
 TOTAL = 13 messages in 3 folders.'
 
 # test -retainsequences
 TOTAL = 13 messages in 3 folders.'
 
 # test -retainsequences
+start_test "-retainsequences"
 mark first -seq seq1
 mark last -seq seq2
 refile first last -retainsequences +other
 mark first -seq seq1
 mark last -seq seq2
 refile first last -retainsequences +other
@@ -233,6 +252,7 @@ seq2: 17"
 
 # test -retainsequences when refiling to same folder (+other)
 # cur is set to the original message number of the last message refiled.
 
 # test -retainsequences when refiling to same folder (+other)
 # cur is set to the original message number of the last message refiled.
+start_test "-retainsequences when refiling to same folder (+other)"
 mark first -seq seq1 -zero
 mark first=2 -seq seq2 -zero
 refile first:2 -retainsequences +other
 mark first -seq seq1 -zero
 mark first=2 -seq seq2 -zero
 refile first:2 -retainsequences +other
@@ -240,4 +260,5 @@ run_test 'mark -list' "cur: 2
 seq1: 18
 seq2: 19"
 
 seq1: 18
 seq2: 19"
 
+finish_test
 exit $failed
 exit $failed
index 8eaa2255e264e69e8bba338a6d924f145d529eff..72860e861b7938848b6dcd1d5e48e514dbc8117a 100755 (executable)
@@ -27,6 +27,7 @@ actual2="$MH_TEST_DIR"/$$.actual2
 md="$MH_TEST_DIR"/Mail/maildelivery
 
 # check -help
 md="$MH_TEST_DIR"/Mail/maildelivery
 
 # check -help
+start_test "-help"
 cat >"$expected" <<EOF
 Usage: slocal [switches]
   switches are:
 cat >"$expected" <<EOF
 Usage: slocal [switches]
   switches are:
@@ -49,6 +50,7 @@ run_prog $slocal -help 2>&1 | sed '/^$/,$d' >"$actual"
 check "$expected" "$actual"
 
 # check -version
 check "$expected" "$actual"
 
 # check -version
+start_test "-version"
 case `$slocal -vers` in
   slocal\ --*) ;;
   *          ) printf '%s: slocal -vers generated unexpected output\n' "$0" >&2
 case `$slocal -vers` in
   slocal\ --*) ;;
   *          ) printf '%s: slocal -vers generated unexpected output\n' "$0" >&2
@@ -56,9 +58,11 @@ case `$slocal -vers` in
 esac
 
 # check unknown switch
 esac
 
 # check unknown switch
+start_test "unknown switch"
 run_test "$slocal -nonexistent" 'slocal: -nonexistent unknown'
 
 # check non-switch argument
 run_test "$slocal -nonexistent" 'slocal: -nonexistent unknown'
 
 # check non-switch argument
+start_test "non-switch argument"
 run_test "$slocal nonexistent" 'slocal: only switch arguments are supported'
 
 # If no mail spool, explicitly specify the mailbox.
 run_test "$slocal nonexistent" 'slocal: only switch arguments are supported'
 
 # If no mail spool, explicitly specify the mailbox.
@@ -72,6 +76,7 @@ fi
 [ -x /usr/bin/tee ]  &&  tee=/usr/bin/tee  ||  tee=tee
 
 # check basic operation
 [ -x /usr/bin/tee ]  &&  tee=/usr/bin/tee  ||  tee=tee
 
 # check basic operation
+start_test "basic operation"
 # Can't use rcvstore because slocal wipes out the environment.
 # So, it would put the message in the user's inbox, not the
 # test inbox.  slocal also freopens stdout and stderr to
 # Can't use rcvstore because slocal wipes out the environment.
 # So, it would put the message in the user's inbox, not the
 # test inbox.  slocal also freopens stdout and stderr to
@@ -93,22 +98,26 @@ if [ ${failed:-0} -eq 1 ]; then
 fi
 
 # check -debug
 fi
 
 # check -debug
+start_test "-debug"
 run_prog $slocal -debug -maildelivery "$md" $mbox <"$MH_TEST_DIR"/Mail/inbox/1 \
   >"$actual2" 2>&1
 run_test "grep ^retrieving $actual2" 'retrieving message from stdin'
 
 # check -verbose
 run_prog $slocal -debug -maildelivery "$md" $mbox <"$MH_TEST_DIR"/Mail/inbox/1 \
   >"$actual2" 2>&1
 run_test "grep ^retrieving $actual2" 'retrieving message from stdin'
 
 # check -verbose
+start_test "-verbose"
 run_prog $slocal -verbose -maildelivery "$md" $mbox \
   <"$MH_TEST_DIR"/Mail/inbox/1 >"$actual2" 2>&1
 run_test "grep ^delivering $actual2" "delivering to pipe \"$tee\", success."
 
 # check -noverbose
 run_prog $slocal -verbose -maildelivery "$md" $mbox \
   <"$MH_TEST_DIR"/Mail/inbox/1 >"$actual2" 2>&1
 run_test "grep ^delivering $actual2" "delivering to pipe \"$tee\", success."
 
 # check -noverbose
+start_test "-noverbose"
 run_prog $slocal -verbose -noverbose -maildelivery "$md" $mbox \
   <"$MH_TEST_DIR"/Mail/inbox/1 >"$actual2" 2>&1
 run_test "grep ^delivering $actual2" ''
 rm -f "$actual2"
 
 # check match of From
 run_prog $slocal -verbose -noverbose -maildelivery "$md" $mbox \
   <"$MH_TEST_DIR"/Mail/inbox/1 >"$actual2" 2>&1
 run_test "grep ^delivering $actual2" ''
 rm -f "$actual2"
 
 # check match of From
+start_test "match of From"
 cat >"$md"  <<EOF
 From test2@example.com qpipe A "$tee $actual"
 EOF
 cat >"$md"  <<EOF
 From test2@example.com qpipe A "$tee $actual"
 EOF
@@ -117,6 +126,7 @@ run_prog $slocal -maildelivery "$md" $mbox <"$MH_TEST_DIR"/Mail/inbox/2
 check "$MH_TEST_DIR/Mail/inbox/2" "$actual" 'keep first'
 
 # check R and ?
 check "$MH_TEST_DIR/Mail/inbox/2" "$actual" 'keep first'
 
 # check R and ?
+start_test "R and ?"
 cat >"$md"  <<EOF
 From test3@example.com qpipe R "$tee $actual"
 From test3@example.com qpipe ? "$tee $actual2"
 cat >"$md"  <<EOF
 From test3@example.com qpipe R "$tee $actual"
 From test3@example.com qpipe ? "$tee $actual2"
@@ -127,6 +137,7 @@ check "$MH_TEST_DIR/Mail/inbox/3" "$actual" 'keep first'
 check "$MH_TEST_DIR/Mail/inbox/3" "$actual2" 'keep first'
 
 # check R and N
 check "$MH_TEST_DIR/Mail/inbox/3" "$actual2" 'keep first'
 
 # check R and N
+start_test "R and N"
 cat >"$md"  <<EOF
 From test4@example.com qpipe R "$tee $actual"
 From test4@example.com qpipe N "$tee $actual2"
 cat >"$md"  <<EOF
 From test4@example.com qpipe R "$tee $actual"
 From test4@example.com qpipe N "$tee $actual2"
@@ -137,6 +148,7 @@ check "$MH_TEST_DIR/Mail/inbox/4" "$actual" 'keep first'
 check "$MH_TEST_DIR/Mail/inbox/4" "$actual2" 'keep first'
 
 # check default
 check "$MH_TEST_DIR/Mail/inbox/4" "$actual2" 'keep first'
 
 # check default
+start_test "default"
 cat >"$md"  <<EOF
 From test5@example.com qpipe R "$tee $actual"
 default 1 qpipe A "$tee $actual2"
 cat >"$md"  <<EOF
 From test5@example.com qpipe R "$tee $actual"
 default 1 qpipe A "$tee $actual2"
@@ -147,6 +159,7 @@ check "$MH_TEST_DIR/Mail/inbox/5" "$actual" 'keep first'
 check "$MH_TEST_DIR/Mail/inbox/5" "$actual2" 'keep first'
 
 # check -addr
 check "$MH_TEST_DIR/Mail/inbox/5" "$actual2" 'keep first'
 
 # check -addr
+start_test "-addr"
 cat >"$md"  <<EOF
 addr someaddress qpipe A "$tee $actual"
 EOF
 cat >"$md"  <<EOF
 addr someaddress qpipe A "$tee $actual"
 EOF
@@ -156,6 +169,7 @@ run_prog $slocal -addr someaddress -maildelivery "$md" $mbox \
 check "$MH_TEST_DIR/Mail/inbox/6" "$actual" 'keep first'
 
 # check -addr with . in address
 check "$MH_TEST_DIR/Mail/inbox/6" "$actual" 'keep first'
 
 # check -addr with . in address
+start_test "-addr with . in address"
 cat >"$md"  <<EOF
 addr "first.last" qpipe A "$tee $actual"
 EOF
 cat >"$md"  <<EOF
 addr "first.last" qpipe A "$tee $actual"
 EOF
@@ -164,6 +178,7 @@ run_prog $slocal -addr 'first.last' \
 check "$MH_TEST_DIR/Mail/inbox/6" "$actual" 'keep first'
 
 # check -info
 check "$MH_TEST_DIR/Mail/inbox/6" "$actual" 'keep first'
 
 # check -info
+start_test "-info"
 cat >"$md"  <<EOF
 * - qpipe A "\$(info) $actual"
 EOF
 cat >"$md"  <<EOF
 * - qpipe A "\$(info) $actual"
 EOF
@@ -173,6 +188,7 @@ run_prog $slocal -info $tee -maildelivery "$md" $mbox \
 check "$MH_TEST_DIR/Mail/inbox/7" "$actual" 'keep first'
 
 # check -sender, which is compared with "source"
 check "$MH_TEST_DIR/Mail/inbox/7" "$actual" 'keep first'
 
 # check -sender, which is compared with "source"
+start_test "-sender, which is compared with "source""
 cat >"$md"  <<EOF
 source somesender qpipe A "$tee $actual"
 EOF
 cat >"$md"  <<EOF
 source somesender qpipe A "$tee $actual"
 EOF
@@ -182,6 +198,7 @@ run_prog $slocal -sender somesender -maildelivery "$md" $mbox \
 check "$MH_TEST_DIR/Mail/inbox/8" "$actual" 'keep first'
 
 # check -user
 check "$MH_TEST_DIR/Mail/inbox/8" "$actual" 'keep first'
 
 # check -user
+start_test "-user"
 cat >"$md"  <<EOF
 * - qpipe A "$tee $actual"
 EOF
 cat >"$md"  <<EOF
 * - qpipe A "$tee $actual"
 EOF
@@ -197,6 +214,7 @@ check "$MH_TEST_DIR/Mail/inbox/9" "$actual" 'keep first'
 # that there is one.
 
 # check -mailbox
 # that there is one.
 
 # check -mailbox
+start_test "-mailbox"
 cat >"$md"  <<EOF
 EOF
 
 cat >"$md"  <<EOF
 EOF
 
@@ -207,6 +225,7 @@ rm -f "$actual"
 check "$MH_TEST_DIR/Mail/inbox/10" "$MH_TEST_DIR/Mail/inbox/11" 'keep first'
 
 # check -file
 check "$MH_TEST_DIR/Mail/inbox/10" "$MH_TEST_DIR/Mail/inbox/11" 'keep first'
 
 # check -file
+start_test "-file"
 run_prog $slocal -mailbox "$actual" -maildelivery "$md" \
   -file "$MH_TEST_DIR"/Mail/inbox/1
 inc -file "$actual" -silent -truncate
 run_prog $slocal -mailbox "$actual" -maildelivery "$md" \
   -file "$MH_TEST_DIR"/Mail/inbox/1
 inc -file "$actual" -silent -truncate
@@ -214,6 +233,7 @@ rm -f "$actual"
 check "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/inbox/11" 'keep first'
 
 # check -suppressdup
 check "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/inbox/11" 'keep first'
 
 # check -suppressdup
+start_test "-suppressdup"
 cat >"$md"  <<EOF
 * - qpipe A "$tee $actual"
 EOF
 cat >"$md"  <<EOF
 * - qpipe A "$tee $actual"
 EOF
@@ -230,8 +250,10 @@ if [ -f "$actual" ]; then
 fi
 
 # check -nosuppressdup
 fi
 
 # check -nosuppressdup
+start_test "-nosuppressdup"
 run_prog $slocal -suppress -nosuppressdup -maildelivery "$md" $mbox \
   <"$MH_TEST_DIR"/Mail/inbox/2
 check "$MH_TEST_DIR/Mail/inbox/2" "$actual" 'keep first'
 
 run_prog $slocal -suppress -nosuppressdup -maildelivery "$md" $mbox \
   <"$MH_TEST_DIR"/Mail/inbox/2
 check "$MH_TEST_DIR/Mail/inbox/2" "$actual" 'keep first'
 
+finish_test
 exit ${failed:-0}
 exit ${failed:-0}
index 6563a7e4ab33c67fc9926520e463dca779b566ca..0928fe94077371d35ba1b7e55fa22b3ae9ac8bac 100755 (executable)
@@ -35,6 +35,7 @@ This is a draft message.
 EOF
 
 # check -help
 EOF
 
 # check -help
+start_test "-help"
 # Only look at first 10 lines because the rest depend on
 # whether sasl support was configured in.
 cat >$expected <<EOF
 # Only look at first 10 lines because the rest depend on
 # whether sasl support was configured in.
 cat >$expected <<EOF
@@ -54,6 +55,7 @@ run_prog whom -help 2>&1 | head -10 >$actual
 check $expected $actual
 
 # check -version
 check $expected $actual
 
 # check -version
+start_test "-version"
 case `whom -v` in
   whom\ --*) ;;
   *       ) echo "$0: whom -v generated unexpected output" 1>&2
 case `whom -v` in
   whom\ --*) ;;
   *       ) echo "$0: whom -v generated unexpected output" 1>&2
@@ -61,22 +63,27 @@ case `whom -v` in
 esac
 
 # check with no options
 esac
 
 # check with no options
+start_test "with no options"
 run_test 'whom' '  -- Network Recipients --
   user at example.com'
 
 # check -nocheck
 run_test 'whom' '  -- Network Recipients --
   user at example.com'
 
 # check -nocheck
+start_test "-nocheck"
 run_test 'whom -check -nocheck' '  -- Network Recipients --
   user at example.com'
 
 # check with file specified
 run_test 'whom -check -nocheck' '  -- Network Recipients --
   user at example.com'
 
 # check with file specified
+start_test "with file specified"
 run_test "whom $MH_TEST_DIR/Mail/draft" '  -- Network Recipients --
   user at example.com'
 
 # check -draftmessage
 run_test "whom $MH_TEST_DIR/Mail/draft" '  -- Network Recipients --
   user at example.com'
 
 # check -draftmessage
+start_test "-draftmessage"
 run_test "whom -draftm draft" '  -- Network Recipients --
   user at example.com'
 
 # check -draftfolder with -draftmessage
 run_test "whom -draftm draft" '  -- Network Recipients --
   user at example.com'
 
 # check -draftfolder with -draftmessage
+start_test "-draftfolder with -draftmessage"
 folder +drafts -create >/dev/null
 folder +inbox -fast >/dev/null
 cp $MH_TEST_DIR/Mail/draft $MH_TEST_DIR/Mail/drafts/1
 folder +drafts -create >/dev/null
 folder +inbox -fast >/dev/null
 cp $MH_TEST_DIR/Mail/draft $MH_TEST_DIR/Mail/drafts/1
@@ -85,23 +92,27 @@ run_test "whom -draftfolder +drafts -draftm 1" \
   user at example.com'
 
 # check -draftfolder with current draftmessage
   user at example.com'
 
 # check -draftfolder with current draftmessage
+start_test "-draftfolder with current draftmessage"
 folder +drafts 1 >/dev/null
 run_test "whom -draftfolder +drafts" \
 '  -- Network Recipients --
   user at example.com'
 
 # check -nodraftfolder
 folder +drafts 1 >/dev/null
 run_test "whom -draftfolder +drafts" \
 '  -- Network Recipients --
   user at example.com'
 
 # check -nodraftfolder
+start_test "-nodraftfolder"
 run_test 'whom -draftfolder +nonexistent -nodraftfolder' \
 '  -- Network Recipients --
   user at example.com'
 
 # check -draft, though I'm not sure that it's useful.  Note that it
 run_test 'whom -draftfolder +nonexistent -nodraftfolder' \
 '  -- Network Recipients --
   user at example.com'
 
 # check -draft, though I'm not sure that it's useful.  Note that it
+start_test "-draft, though I'm not sure that it's useful.  Note that it"
 # must appear after the file argument when run standalone.
 run_test "whom $MH_TEST_DIR/Mail/drafts/1 -draft" \
 '  -- Network Recipients --
   user at example.com'
 
 # check -alias
 # must appear after the file argument when run standalone.
 run_test "whom $MH_TEST_DIR/Mail/drafts/1 -draft" \
 '  -- Network Recipients --
   user at example.com'
 
 # check -alias
+start_test "-alias"
 rm -f $MH_TEST_DIR/Mail/draft
 cat >$MH_TEST_DIR/Mail/draft <<'EOF'
 From: Test1 <test1@example.com>
 rm -f $MH_TEST_DIR/Mail/draft
 cat >$MH_TEST_DIR/Mail/draft <<'EOF'
 From: Test1 <test1@example.com>
@@ -118,8 +129,10 @@ run_test 'whom -alias nmhaliases' '  -- Network Recipients --
   user1 at example.com'
 
 # check -alias with nonexistent aliasfile
   user1 at example.com'
 
 # check -alias with nonexistent aliasfile
+start_test "-alias with nonexistent aliasfile"
 run_test 'whom -alias nonexistent' \
 "whom: aliasing error in nonexistent - unable to read 'nonexistent'"
 
 
 run_test 'whom -alias nonexistent' \
 "whom: aliasing error in nonexistent - unable to read 'nonexistent'"
 
 
+finish_test
 exit $failed
 exit $failed