From 8115c2f00dda36b1ee8db290743536a9b6e406cf Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Mon, 5 Mar 2012 13:55:04 -0500 Subject: [PATCH 1/1] Finally got a reasonable burst test working. --- test/burst/test-burst | 98 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 2 deletions(-) diff --git a/test/burst/test-burst b/test/burst/test-burst index 872844c..e654535 100755 --- a/test/burst/test-burst +++ b/test/burst/test-burst @@ -48,6 +48,100 @@ EOF burst 11 || exit -scan 11-last +run_test 'scan -width 80 11-last' \ +" 11 09/29 Test Burst Messag Test digest<<------- Message one From: Mister Bu + 12+ 09/28 Mister Burster Message one<> + 13 09/28 Mister Burster Message two<>" -exit 0 +# +# Create another test message that stresses the boundary checker a bit +# + +cat > "${MH_TEST_DIR}/Mail/inbox/14" < +To: Test Recipient +Date: Friday, 29 Sep 2006 00:00:00 +Subject: Test digest + +This is a preamble +------- Message one + +From: Mister Burster +To: Nobody 1 +Date: Thursday, 28 Sep 2006 00:01:00 +Subject: Message one + +- -This is message one + +------- Message two +From: Mister Burster +To: Nobody 2 +Date: Thursday, 28 Sep 2006 00:02:00 +Subject: Message two + +This is message two +- For real. +------- Message three + + + +From: Mister Burster +To: Nobody 3 +Date: Thursday, 28 Sep 2006 00:03:00 +Subject: Message three + +Will this one work? + + +------ Message three +End of all messages +EOF + +burst 14 || exit + +run_test 'scan -width 80 14-last' \ +" 14 09/29 Test Burst Messag Test digest<> + 16 09/28 Mister Burster Message two<> + 17 09/28 Mister Burster Message three<>" + +# +# Check to see if each message is what we expect +# + +run_test 'show -noheader -noshow 15' \ +"From: Mister Burster +To: Nobody 1 +Date: Thursday, 28 Sep 2006 00:01:00 +Subject: Message one + +-This is message one" + +run_test 'show -noheader -noshow 16' \ +"From: Mister Burster +To: Nobody 2 +Date: Thursday, 28 Sep 2006 00:02:00 +Subject: Message two + +This is message two +For real." + +# +# Backticks used by run_test can consume blank lines at the end of the +# command output, so use check for this one. +# + +expected="${MH_TEST_DIR}/$$.expected" +cat > "${expected}" < +To: Nobody 3 +Date: Thursday, 28 Sep 2006 00:03:00 +Subject: Message three + +Will this one work? + +EOF + +check "${expected}" `mhpath 17` + +exit $failed -- 1.7.10.4