X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/f5d8200783f132f760b2ecda6358cdc0180f677b..f8d3c4d16b4a2cf0034dc1159c0c68dc78fd0921:/test/inc/test-inc-scanout diff --git a/test/inc/test-inc-scanout b/test/inc/test-inc-scanout index 75be7dc2..140b54c0 100755 --- a/test/inc/test-inc-scanout +++ b/test/inc/test-inc-scanout @@ -15,6 +15,10 @@ fi setup_test +thisdir="$srcdir/test/inc" +expected="$MH_TEST_DIR/$$.expected" +actual="$MH_TEST_DIR/$$.actual" + cat > "${MH_TEST_DIR}/test.mbox" <"$MH_TEST_DIR/mess" < +To: Some Other User +Subject: all that and nothing to say? +Date: Thu, 10 Jan 2013 19:54:01 -0500 + +EOF + +run_test 'scan -width 60 -file '"$MH_TEST_DIR/mess" \ + ' 1 01/10 No Such User all that and nothing to say?' +rm -f "$MH_TEST_DIR/mess" + +# 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` <"$MH_TEST_DIR/mess" < +To: Some Other User +Subject: FLDPLUS test +Date: Wed, 16 Jan 2013 20:33:58 -0600 + +EOF + +run_test 'scan -width 80 -file '"$MH_TEST_DIR"'/mess' \ + ' 1 01/16 No Such User FLDPLUS test' +rm -f "$MH_TEST_DIR/mess" + +# check inc of message with header field body with more than 511 characters +cat >"$expected" < +To: Some Other User +Subject: FLDPLUS test +Date: Wed, 16 Jan 2013 20:33:58 -0600 +EOF + +cat >"$MH_TEST_DIR/mess" < +To: Some Other User +Subject: FLDPLUS test +Date: Wed, 16 Jan 2013 20:33:58 -0600 + +EOF +run_prog inc -file "$MH_TEST_DIR/mess" >/dev/null +check "$expected" `mhpath last` || rmm last +rm -f "$MH_TEST_DIR/mess" + +# check scan and inc of mbox with multiple messages +echo y | packf -file "$MH_TEST_DIR/msgbox" +run_test "scan -width 80 -file $MH_TEST_DIR/msgbox" \ +' 1 09/29 Test1 Testing message 1<> + 2 09/29 Test2 Testing message 2<> + 3 09/29 Test3 Testing message 3<> + 4 09/29 Test4 Testing message 4<> + 5 09/29 Test5 Testing message 5<> + 6 09/29 Test6 Testing message 6<> + 7 09/29 Test7 Testing message 7<> + 8 09/29 Test8 Testing message 8<> + 9 09/29 Test9 Testing message 9<> + 10 09/29 Test10 Testing message 10<> + 11 03/01 Mr Nobody Who is on first?<> + 14 09/29 Test2 Testing message 2<> + 15 09/29 Test3 Testing message 3<> + 16 09/29 Test4 Testing message 4<> + 17 09/29 Test5 Testing message 5<> + 18 09/29 Test6 Testing message 6<> + 19 09/29 Test7 Testing message 7<> + 20 09/29 Test8 Testing message 8<> + 21 09/29 Test9 Testing message 9<> + 22 09/29 Test10 Testing message 10<> + 23 03/01 Mr Nobody Who is on first?<>"$MH_TEST_DIR/msgbox" <>' +rm -f "$MH_TEST_DIR/msgbox" + + exit ${failed:-0}