X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2e04b8ea0e57e411665aa6a8814ff65db0d4cd2b..af2ad7be43057a4f82dc8a223d79d68bf932ae00:/test/dist/test-dist?ds=inline diff --git a/test/dist/test-dist b/test/dist/test-dist index 5c10b17e..d3f6279e 100755 --- a/test/dist/test-dist +++ b/test/dist/test-dist @@ -16,6 +16,28 @@ fi setup_test +check_exit '-eq 1' dist - +check_exit '-eq 1' dist -editor +check_exit '-eq 1' dist -editor foo -editor +check_exit '-eq 1' dist -nowhatnowproc -whatnowproc foo -whatnowproc +check_exit '-eq 1' dist -file +check_exit '-eq 1' dist -file foo -file bar +check_exit '-eq 1' dist -form +check_exit '-eq 1' dist -draftfolder +check_exit '-eq 1' dist -draftfolder foo -draftfolder bar +check_exit '-eq 1' dist -draftmessage +check_exit '-eq 1' dist -draftmessage 42 -draftmessage 314 +check_exit '-eq 1' dist -from +check_exit '-eq 1' dist -to +check_exit '-eq 1' dist -cc +check_exit '-eq 1' dist -fcc +check_exit '-eq 1' dist -width +check_exit '-eq 1' dist -width 42 -width 0 +check_exit '-eq 1' dist -atfile -noatfile - +check_exit '-eq 1' dist + @ +check_exit '-eq 1' dist 42 314 +check_exit '-eq 1' dist -file foo 42 + expected=$MH_TEST_DIR/$$.expected expected_err=$MH_TEST_DIR/$$.expected_err actual=$MH_TEST_DIR/$$.actual @@ -36,7 +58,7 @@ test_dist () # fakesendmail drops the message and any cc's into this mbox. mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox inc -silent -file "$mbox" - rm -f "$mbox" "$mbox.map" + rm -f "$mbox" # It's hard to calculate the exact Date: header post is going to # use, so we'll just use sed to remove the actual date so we can @@ -71,7 +93,8 @@ Usage: dist [+folder] [msg] [switches] -[no]atfile EOF -dist -help >"$actual" 2>&1 +#### Skip nmh intro text. +dist -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version @@ -388,8 +411,7 @@ run_test 'scan +outbox -width 6 2' ' 2 ' # Check that dist encodes headers using RFC-2047 properly # -require_locale en_US.utf-8 en_US.utf8 -LC_ALL=en_US.UTF-8; export LC_ALL +require_locale en_US.UTF-8 en_US.UTF8 en_US.utf-8 en_US.utf8 cat >"$expected" <