X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/025963d5fe8ca0781eee8c83c23b4ea1209a3b0b..403805faa7a8564c103801891b5abf33974767ad:/test/slocal/test-slocal diff --git a/test/slocal/test-slocal b/test/slocal/test-slocal index 8eaa2255..72860e86 100755 --- a/test/slocal/test-slocal +++ b/test/slocal/test-slocal @@ -27,6 +27,7 @@ actual2="$MH_TEST_DIR"/$$.actual2 md="$MH_TEST_DIR"/Mail/maildelivery # check -help +start_test "-help" cat >"$expected" <&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version +start_test "-version" 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 +start_test "unknown switch" 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. @@ -72,6 +76,7 @@ fi [ -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 @@ -93,22 +98,26 @@ if [ ${failed:-0} -eq 1 ]; then 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 +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 +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 +start_test "match of From" cat >"$md" <"$md" <"$md" <"$md" <"$md" <"$md" <"$md" <"$md" <"$md" <"$md" <"$md" <