X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/54483f16238902dcd920de1f6056df6cb0a0d8cf..1d5e6d0340ba258b34b85ccdac4c402ccf4fd51e:/test/bad-input/test-header?ds=sidebyside diff --git a/test/bad-input/test-header b/test/bad-input/test-header index ea5385fa..0148db57 100755 --- a/test/bad-input/test-header +++ b/test/bad-input/test-header @@ -34,13 +34,15 @@ I am a stupid spammer. EOF # check scan +start_test scan cat >"$expected" < "$actual" 2>&1 -check "$expected" "$actual" +check "$expected" "$actual" : scan with bogus header field # check show (mhl) +start_test show cat >"$expected" < "$actual" 2>&1 -check "$expected" "$actual" +check "$expected" "$actual" : "show (mhl) with bogus header field" # check mhshow +start_test mhshow cat >"$expected" < "$actual" 2>&1 -check "$expected" "$actual" +check "$expected" "$actual" : mhshow with bogus header field # check m_getfld() handling of empty header field +start_test 'm_getfld() handling of empty header field' msgfile="$MH_TEST_DIR/Mail/inbox/12" printf 'Date: Sat, 12 Jan 2013 09:07:01 -0600\nReceived:' >"$msgfile" cat >"$expected" <"$expected_err" <"$actual" 2>"$actual_err" -check "$expected" "$actual" -check "$expected_err" "$actual_err" +check "$expected" "$actual" : m_getfld, empty header output +check "$expected_err" "$actual_err" : m_getfld, empty header error # check m_getfld() handling of excessively long header field name +start_test 'm_getfld() handling of excessively long header field name' msgfile="$MH_TEST_DIR/Mail/inbox/13" cat >"$msgfile" <"$expected" <"$actual" 2>"$actual_err" -check "$expected" "$actual" +check "$expected" "$actual" : m_getfld with excessively long header field name # Cygwin has a BUFSIZ of 1024 so the error message gets truncated. # Deal with that by grepping to verify that scan showed the proper error. verify_string_in_file() { @@ -116,27 +122,5 @@ verify_string_in_file 'exceeds 997' "$actual_err" verify_string_in_file '??Format error (message 13) in component 2' "$actual_err" rm -f "$actual_err" -# check m_getfld() handling of long header field name without a colon -msgfile="$MH_TEST_DIR/Mail/inbox/14" -cat >"$msgfile" <"$expected" <"$expected_err" <"$actual" 2>"$actual_err" -check "$expected" "$actual" -check "$expected_err" "$actual_err" - - +finish_test exit $failed