]> diplodocus.org Git - nmh/blobdiff - test/bad-input/test-header
Disable test-version-check, again, when not connected to terminal.
[nmh] / test / bad-input / test-header
index 1bc05f47a6ba395211826db6b3779ee320f9dd6a..eeacc831397e7eaaf34e226e0741232dcf5f287a 100755 (executable)
@@ -35,10 +35,10 @@ EOF
 
 # check scan
 cat >"$expected" <<EOF
-  11  12/18 foo@example.edu    test<<This is a multi-part message in MIME forma
+  11  12/18 foo@example.edu    test<<This is a multi-part message in MIME format
 EOF
 run_prog scan -width 80 last > "$actual" 2>&1
-check "$expected" "$actual"
+check "$expected" "$actual" : scan with bogus header field
 
 # check show (mhl)
 cat >"$expected" <<EOF
@@ -55,30 +55,31 @@ This is a multi-part message in MIME format.
 I am a stupid spammer.
 EOF
 run_prog show last > "$actual" 2>&1
-check "$expected" "$actual"
+check "$expected" "$actual" : "show (mhl) with bogus header field"
 
 # check mhshow
 cat >"$expected" <<EOF
+[ Message inbox:11 ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
 To:      bar@example.edu
 From:    foo@example.edu
 Subject: test
 
 
-part       text/plain                  70
+[ part  - text/plain -   70B  ]
 
 This is a multi-part message in MIME format.
 
 I am a stupid spammer.
 EOF
-run_prog mhshow -nopause last > "$actual" 2>&1
-check "$expected" "$actual"
+run_prog mhshow last > "$actual" 2>&1
+check "$expected" "$actual" : mhshow with bogus header field
 
 # check 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" <<EOF
-  12  01/12 
+  12  01/12  
 EOF
 cat >"$expected_err" <<EOF
 scan: eof encountered in field "Received"
@@ -86,8 +87,8 @@ scan: eof encountered in field "Received"
 EOF
 
 run_prog scan -width 13 last >"$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_get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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaayTooLong: OK
 EOF
 cat >"$expected" <<EOF
-  13  01/15 
+  13  01/15  
 EOF
 
 run_prog scan -width 13 last >"$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() {
@@ -127,7 +128,7 @@ Test
 
 EOF
 cat >"$expected" <<EOF
-  14  01/17 
+  14  01/17  
 EOF
 cat >"$expected_err" <<EOF
 scan: eol encountered in field "If a header field name has at least 512 characters without a newline or colon, it will raise a format error in m_getfld().  Here is a test of that.  01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901"
@@ -135,8 +136,8 @@ scan: eol encountered in field "If a header field name has at least 512 characte
 EOF
 
 run_prog scan -width 13 last >"$actual" 2>"$actual_err"
-check "$expected" "$actual"
-check "$expected_err" "$actual_err"
+check "$expected" "$actual" : m_getfld with long header, no colon output
+check "$expected_err" "$actual_err" : m_getfld with long header, no colon error
 
 
 exit $failed