3 # Tests to see if bursting messages works correctly.
9 # Create a test message that we can burst
13 msgnum="${msgpath##*/}"
15 cat > "$msgpath" <<EOF
16 From: Test Burst Message <burst1@example.com>
17 To: Test Recipient <recipient@example.com>
18 Date: Friday, 29 Sep 2006 00:00:00
23 From: Mister Burster <burst2@example.com>
24 To: Nobody 1 <nobody1@example.com>
25 Date: Thursday, 28 Sep 2006 00:01:00
32 From: Mister Burster <burst3@example.com>
33 To: Nobody 2 <nobody2@example.com>
34 Date: Thursday, 28 Sep 2006 00:02:00
45 runandcheck "scan $msgnum" <<!
46 11 2006-09-29 00:00 Test Burst Messag Test digest
49 runandcheck "burst $msgnum" <<!
52 runandcheck "scan $msgnum-l" <<!
53 11 2006-09-29 00:00 Test Burst Messag Test digest
54 12+ 2006-09-28 00:01 Mister Burster Message one
55 13 2006-09-28 00:02 Mister Burster Message two
60 # Create another test message that stresses the boundary checker a bit
64 msgnum="${msgpath##*/}"
67 From: Test Burst Message <burst1@example.com>
68 To: Test Recipient <recipient@example.com>
69 Date: Friday, 29 Sep 2006 00:00:00
75 From: Mister Burster <burst2@example.com>
76 To: Nobody 1 <nobody1@example.com>
77 Date: Thursday, 28 Sep 2006 00:01:00
80 - -This is message one
83 From: Mister Burster <burst3@example.com>
84 To: Nobody 2 <nobody2@example.com>
85 Date: Thursday, 28 Sep 2006 00:02:00
94 From: Mister Burster <burst4@example.com>
95 To: Nobody 3 <nobody3@example.com>
96 Date: Thursday, 28 Sep 2006 00:03:00
97 Subject: Message three
106 runandcheck "burst $msgnum" <<!
107 burst: message 14 not in digest format, continuing...
110 # mmh's burst(1) is picky about the input format
114 # If we make burst to be more liberal in accepting not perfect
115 # boundaries in the input, we can run the following tests
118 runandcheck "scan $msgnum-l" <<!
119 14 09/29 Test Burst Messag Test digest
120 15+ 09/28 Mister Burster Message one
121 16 09/28 Mister Burster Message two
122 17 09/28 Mister Burster Message three
126 # Check to see if each message is what we expect
129 folder -fast "$msgnum" >/dev/null
131 runandcheck "next" <<!
132 From: Mister Burster <burst2@example.com>
133 To: Nobody 1 <nobody1@example.com>
134 Date: Thursday, 28 Sep 2006 00:01:00
140 runandcheck "next" <<!
141 From: Mister Burster <burst3@example.com>
142 To: Nobody 2 <nobody2@example.com>
143 Date: Thursday, 28 Sep 2006 00:02:00
150 runandcheck "next" <<!
151 From: Mister Burster <burst4@example.com>
152 To: Nobody 3 <nobody3@example.com>
153 Date: Thursday, 28 Sep 2006 00:03:00
154 Subject: Message three