X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/e6c917710e4318949cb4174cabca51a8d1822dbd..42d1984f490da0566a43b9705f02ef820d11d816:/test/post/test-sendfiles diff --git a/test/post/test-sendfiles b/test/post/test-sendfiles index 84f54bfe..22fbe7fe 100755 --- a/test/post/test-sendfiles +++ b/test/post/test-sendfiles @@ -65,7 +65,7 @@ test_sendfiles () (cd $MH_TEST_DIR/tmp && contents=`mhstore -noauto last 2>&1 | \ sed -e 's/storing message.*as file //'` && - $uncompress "$contents" | tar xpf - && rm -f "$contents") + $uncompress <"$contents" | tar xpf - && rm -f "$contents") rmm last check "$testfiledir/$testfile" "$MH_TEST_DIR/tmp/$testfile" \ @@ -76,6 +76,7 @@ test_sendfiles () # check -help +start_test "-help" cat >"$expected" < - -[delay] (expressed in seconds) -version -help Can use PERSON environment variable instead of -from switch. EOF #### Skip nmh intro text. -run_prog sendfiles -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog sendfiles -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version +start_test "-version" case `sendfiles -v` in sendfiles\ --*) ;; * ) printf '%s: sendfiles -v generated unexpected output\n' "$0" >&2 @@ -101,6 +102,7 @@ case `sendfiles -v` in esac # check unknown switch +start_test "unknown switch" run_test 'sendfiles -nonexistent' "Usage: sendfiles [switches] -to recipient \ -subject subject file1 [file2 ...] or @@ -108,12 +110,12 @@ run_test 'sendfiles -nonexistent' "Usage: sendfiles [switches] -to recipient \ switches are: -compress [bzip2 | compress | gzip | lzma | none] -from - -[delay] (expressed in seconds) -version -help 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 \ @@ -123,12 +125,12 @@ Usage: sendfiles [switches] -to recipient \ switches are: -compress [bzip2 | compress | gzip | lzma | none] -from - -[delay] (expressed in seconds) -version -help 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. @@ -140,6 +142,7 @@ Usage: sendfiles [switches] -to recipient \ [ "`findprog lzma`" ] && test_sendfiles 'lzma -cd' new -compress lzma # check with no compression +start_test "with no compression" cat >"$expected" <"$expected" <"$expected" <"$expected" <' # check PERSON environment variable +start_test "PERSON environment variable" cat >"$expected" <"$expected" <"$expected" <