]> diplodocus.org Git - nmh/blobdiff - test/inc/test-inc-scanout
Added check of m_getfld() handling of fields with trailing
[nmh] / test / inc / test-inc-scanout
index ec93999ba8558f0c56d15f53c72e2d54c49db25a..7826af457642f3a91958ef88bb90980aa72fd23d 100755 (executable)
@@ -206,13 +206,25 @@ run_test "scan -width 60 -file $thisdir/lots_of_headers.txt" \
          '   1  01/10 No Such User       all that and nothing to say?'
 
 cat >"$expected" <<EOF
-   1  01/10*
+   1  01/1
 EOF
 cat >"$expected_err" <<EOF
 scan: eof encountered in field "Received"
-??Format error (message -1) in component 1
+??Format error (message -1) in component 2
 EOF
 
+# check m_getfld() handling of fields with trailing whitespace
+# Even though header field names aren't supposed to have spaces (RFC
+# 28220, m_getfld () trims trailing whitespace from them.
+cat >`mhpath new` <<EOF
+Date : Sun, 18 Dec 2005 00:52:39 +0100
+From   : foo@example.edu
+To: bar@example.edu
+Subject: test
+EOF
+run_test 'scan last' '  12  12/18 foo@example.edu    test'
+
+
 # check m_getfld() handling of empty header field
 scan -width 13 -file "$thisdir"/malformed_message.txt >"$actual" 2>"$actual_err"