From: markus schnalke Date: Thu, 12 Nov 2015 19:58:03 +0000 (+0100) Subject: Adjust tests to m_getfld2() and write some more X-Git-Tag: mmh-0.3~39^2~11 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=e200d3000e399ba55437e3b85c73df5ba2df27f4;p=mmh Adjust tests to m_getfld2() and write some more m_getfld2() is more strict than m_getfld() and does less guessing. --- diff --git a/test/tests/bad-input/test-header b/test/tests/bad-input/test-header index cb9202f..e152e0e 100644 --- a/test/tests/bad-input/test-header +++ b/test/tests/bad-input/test-header @@ -1,19 +1,17 @@ #!/bin/sh -###################################################### # -# Test bogus headers (no blank line before body, etc.) -# -###################################################### +# Test bogus and strange headers + . "$MH_TEST_COMMON" expected=$MH_TEST_DIR/$$.expected # Write message with bogus header field (missing blank line, really). -msgfile="$(mhpath b)" -msgnum="$(basename $msgfile)" -cat > $msgfile <"$msgfile" <"$msgfile" + runandcheck "scan l" <"$msgfile" <"$msgfile" <"$msgfile" </dev/null; then -# : -# else -# echo "$0: did not receive expected error message \"$1\"" -# failed=`expr ${failed:-0} + 1` -# fi -# } -# verify_string_in_file 'scan: field name "ThisHeaderFieldNameIsWa' "$actual_err" -# 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 header field name without a colon + +msgfile="`mhpath b`" +msgnum="${msgfile##*/}" +cat >"$msgfile" <"$msgfile" <"$msgfile" <"$msgfile" <"$msgfile" <"$msgfile" <"$msgfile" <"$msgfile" <"$msgfile" <