]>
diplodocus.org Git - nmh/blob - test/inc/test-inc-scanout
3 # Check to see if the scan output is correct if we have a message
4 # right on the stdio buffer boundary
9 if test -z "${MH_OBJ_DIR}"; then
10 srcdir
=`dirname "$0"`/..
/..
11 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
14 .
"$MH_OBJ_DIR/test/common.sh"
18 thisdir
="$srcdir/test/inc"
19 expected
="$MH_TEST_DIR/$$.expected"
20 actual
="$MH_TEST_DIR/$$.actual"
22 cat > "${MH_TEST_DIR}/test.mbox" <<EOF
23 From nobody@nowhereville Jan 1 1970
24 Received: I am the very model of a modern Major-General,
25 Received: I've information vegetable, animal, and mineral,
26 Received: I know the kings of England, and I quote the fights historical
27 Received: From Marathon to Waterloo, in order categorical;
28 Received: I'm very well acquainted, too, with matters mathematical,
29 Received: I understand equations, both the simple and quadratical,
30 Received: About binomial theorem I'm teeming with a lot o' news,
31 Received: With many cheerful facts about the square of the hypotenuse.
32 Received: I'm very good at integral and differential calculus;
33 Received: I know the scientific names of beings animalculous:
34 Received: In short, in matters vegetable, animal, and mineral,
35 Received: I am the very model of a modern Major-General.
36 Received: I know our mythic history, King Arthur's and Sir Caradoc's;
37 Received: I answer hard acrostics, I've a pretty taste for paradox,
38 Received: I quote in elegiacs all the crimes of Heliogabalus,
39 Received: In conics I can floor peculiarities parabolous;
40 Received: I can tell undoubted Raphaels from Gerard Dows and Zoffanies,
41 Received: I know the croaking chorus from The Frogs of Aristophanes!
42 Received: Then I can hum a fugue of which I've heard the music's din afore,c
43 Received: And whistle all the airs from that infernal nonsense Pinafore.
44 Received: Then I can write a washing bill in Babylonic cuneiform,
45 Received: And tell you ev'ry detail of Caractacus's uniform:d
46 Received: In short, in matters vegetable, animal, and mineral,
47 Received: I am the very model of a modern Major-General.
48 Received: In fact, when I know what is meant by "mamelon" and "ravelin",
49 Received: When I can tell at sight a Mauser rifle from a Javelin,
50 Received: When such affairs as sorties and surprises I'm more wary at,
51 Received: And when I know precisely what is meant by "commissariat",
52 Received: When I have learnt what progress has been made in modern gunnery,
53 Received: When I know more of tactics than a novice in a nunnery—
54 Received: In short, when I've a smattering of elemental strategy—
55 Received: You'll say a better Major-General has never sat a gee.
56 Received: For my military knowledge, though I'm plucky and adventury,
57 Received: Has only been brought down to the beginning of the century;
58 Received: But still, in matters vegetable, animal, and mineral,
59 Received: I am the very model of a modern Major-General.
60 Received: For the Angel of Death spread his wings on the blast,
61 Received: And breathed in the face of the foe as he passed:
62 Received: the eyes of the sleepers waxed deadly and chill,
63 Received: And their hearts but once heaved, and for ever grew still!
64 Received: Abbott: Strange as it may seem, they give ball players nowadays very peculiar names.
65 Received: Costello: Funny names?
66 Received: Abbott: Nicknames, nicknames. Now, on the St. Louis team we have Who's on first, What's on second, I Don't Know is on third--
67 Received: Costello: That's what I want to find out. I want you to tell me the names of the fellows on the St. Louis team.
68 Received: Abbott: I'm telling you. Who's on first, What's on second, I Don't Know is on third--
69 Received: Costello: You know the fellows' names?
70 Received: Abbott: Yes.
71 Received: Costello: Well, then who's playing first?
72 Received: Abbott: Yes.
73 Received: Costello: I mean the fellow's name on first base.
74 Received: Abbott: Who.
75 Received: Costello: The fellow playin' first base.
76 Received: Abbott: Who.
77 Received: Costello: The guy on first base.
78 Received: Abbott: Who is on first.
79 Received: Costello: Well, what are you askin' me for?
80 Received: Abbott: I'm not asking you--I'm telling you. Who is on first.
81 Received: Costello: I'm asking you--who's on first?
82 Received: Abbott: That's the man's name.
83 Received: Costello: That's who's name?
84 Received: Abbott: Yes.
85 Received: Costello: When you pay off the first baseman every month, who gets the money?
86 X-Spam-Source: Definitely spam! Seriously!
87 From: Mr Nobody <nobody1@example.com>
88 To: Another Nobody <nobody2@example.com>
89 Date: Thu, 1 Mar 2012 01:02:03 -0500
90 Subject: Who is on first?
92 Abbott: Every dollar of it. And why not, the man's entitled to it.
95 Costello: So who gets it?
96 Abbott: Why shouldn't he? Sometimes his wife comes down and collects it.
98 Abbott: Yes. After all, the man earns it.
101 Costello: Well, all I'm trying to find out is what's the guy's name on first base?
102 Abbott: Oh, no, no. What is on second base.
103 Costello: I'm not asking you who's on second.
104 Abbott: Who's on first!
107 cat > "${MH_TEST_DIR}/test.mbox.2" <<EOF
108 Received: I am the very model of a modern Major-General,
109 Received: I've information vegetable, animal, and mineral,
110 Received: I know the kings of England, and I quote the fights historical
111 Received: From Marathon to Waterloo, in order categorical;
112 Received: I'm very well acquainted, too, with matters mathematical,
113 Received: I understand equations, both the simple and quadratical,
114 Received: About binomial theorem I'm teeming with a lot o' news,
115 Received: With many cheerful facts about the square of the hypotenuse.
116 Received: I'm very good at integral and differential calculus;
117 Received: I know the scientific names of beings animalculous:
118 Received: In short, in matters vegetable, animal, and mineral,
119 Received: I am the very model of a modern Major-General.
120 Received: I know our mythic history, King Arthur's and Sir Caradoc's;
121 Received: I answer hard acrostics, I've a pretty taste for paradox,
122 Received: I quote in elegiacs all the crimes of Heliogabalus,
123 Received: In conics I can floor peculiarities parabolous;
124 Received: I can tell undoubted Raphaels from Gerard Dows and Zoffanies,
125 Received: I know the croaking chorus from The Frogs of Aristophanes!
126 Received: Then I can hum a fugue of which I've heard the music's din afore,c
127 Received: And whistle all the airs from that infernal nonsense Pinafore.
128 Received: Then I can write a washing bill in Babylonic cuneiform,
129 Received: And tell you ev'ry detail of Caractacus's uniform:d
130 Received: In short, in matters vegetable, animal, and mineral,
131 Received: I am the very model of a modern Major-General.
132 Received: In fact, when I know what is meant by "mamelon" and "ravelin",
133 Received: When I can tell at sight a Mauser rifle from a Javelin,
134 Received: When such affairs as sorties and surprises I'm more wary at,
135 Received: And when I know precisely what is meant by "commissariat",
136 Received: When I have learnt what progress has been made in modern gunnery,
137 Received: When I know more of tactics than a novice in a nunnery—
138 Received: In short, when I've a smattering of elemental strategy—
139 Received: You'll say a better Major-General has never sat a gee.
140 Received: For my military knowledge, though I'm plucky and adventury,
141 Received: Has only been brought down to the beginning of the century;
142 Received: But still, in matters vegetable, animal, and mineral,
143 Received: I am the very model of a modern Major-General.
144 Received: For the Angel of Death spread his wings on the blast,
145 Received: And breathed in the face of the foe as he passed:
146 Received: the eyes of the sleepers waxed deadly and chill,
147 Received: And their hearts but once heaved, and for ever grew still!
148 Received: Abbott: Strange as it may seem, they give ball players nowadays very peculiar names.
149 Received: Costello: Funny names?
150 Received: Abbott: Nicknames, nicknames. Now, on the St. Louis team we have Who's on first, What's on second, I Don't Know is on third--
151 Received: Costello: That's what I want to find out. I want you to tell me the names of the fellows on the St. Louis team.
152 Received: Abbott: I'm telling you. Who's on first, What's on second, I Don't Know is on third--
153 Received: Costello: You know the fellows' names?
154 Received: Abbott: Yes.
155 Received: Costello: Well, then who's playing first?
156 Received: Abbott: Yes.
157 Received: Costello: I mean the fellow's name on first base.
158 Received: Abbott: Who.
159 Received: Costello: The fellow playin' first base.
160 Received: Abbott: Who.
161 Received: Costello: The guy on first base.
162 Received: Abbott: Who is on first.
163 Received: Costello: Well, what are you askin' me for?
164 Received: Abbott: I'm not asking you--I'm telling you. Who is on first.
165 Received: Costello: I'm asking you--who's on first?
166 Received: Abbott: That's the man's name.
167 Received: Costello: That's who's name?
168 Received: Abbott: Yes.
169 Received: Costello: When you pay off the first baseman every month, who gets the money?
170 X-Spam-Source: Definitely spam! Seriously!
171 From: Mr Nobody <nobody1@example.com>
172 To: Another Nobody <nobody2@example.com>
173 Date: Thu, 1 Mar 2012 01:02:03 -0500
174 Subject: Who is on first?
176 Abbott: Every dollar of it. And why not, the man's entitled to it.
179 Costello: So who gets it?
180 Abbott: Why shouldn't he? Sometimes his wife comes down and collects it.
181 Costello: Who's wife?
182 Abbott: Yes. After all, the man earns it.
185 Costello: Well, all I'm trying to find out is what's the guy's name on first base?
186 Abbott: Oh, no, no. What is on second base.
187 Costello: I'm not asking you who's on second.
188 Abbott: Who's on first!
191 run_test
"inc -file ${MH_TEST_DIR}/test.mbox -width 120 -truncate" \
192 "Incorporating new mail into inbox...
194 11+ 03/01 Mr Nobody Who is on first?<<Abbott: Every dollar of it. And why not, the man's entitled to it. Cost"
196 check
`mhpath +inbox 11` "${MH_TEST_DIR}/test.mbox.2" "keep first"
197 rm -f "${MH_TEST_DIR}/test.mbox" "${MH_TEST_DIR}/test.mbox.2"
199 run_test
"scan -width 120 +inbox 11" \
200 " 11+ 03/01 Mr Nobody Who is on first?<<Abbott: Every dollar of it. And why not, the man's entitled to it. Cost"
202 # check header field name with ':' character than lands on m_getfld() buffer
203 start_test
"header field name with ':' character than lands on m_getfld() buffer"
204 cat >"$MH_TEST_DIR/mess" <<EOF
205 Comments: The important characteristic of this message is that the 8193'rd
206 Comments: byte is the ':' at the end of header field name. That tests some
207 Comments: logic in m_getfld (), assuming its MSG_INPUT_SIZE is 8192.
208 Comments: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
209 Comments: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
210 Comments: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
211 Comments: DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
212 Comments: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
213 Comments: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
214 Comments: GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
215 Comments: HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
216 Comments: IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
217 Comments: JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
218 Comments: KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
219 Comments: LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
220 Comments: MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
221 Comments: NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
222 Comments: OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
223 Comments: PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
224 Comments: QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
225 Comments: RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
226 Comments: SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
227 Comments: TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
228 Comments: UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
229 Comments: VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
230 Comments: WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
231 Comments: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
232 Comments: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
233 Comments: ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
234 Comments: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
235 Comments: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
236 Comments: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
237 Comments: dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
238 Comments: eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
239 Comments: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
240 Comments: gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
241 Comments: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
242 Comments: iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
243 Comments: jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
244 Comments: kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
245 Comments: llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
246 Comments: mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
247 Comments: nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
248 Comments: oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
249 Comments: pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
250 Comments: qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
251 Comments: rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
252 Comments: ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
253 Comments: tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
254 Comments: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
255 Comments: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
256 Comments: wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
257 Comments: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
258 Comments: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
259 Comments: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
260 Comments: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
261 Comments: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
262 Comments: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
263 Comments: DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
264 Comments: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
265 Comments: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
266 Comments: GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
267 Comments: HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
268 Comments: IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
269 Comments: JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
270 Comments: KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
271 Comments: LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
272 Comments: MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
273 Comments: NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
274 Comments: OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
275 Comments: PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
276 Comments: QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
277 Comments: RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
278 Comments: SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
279 Comments: TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
280 Comments: UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
281 Comments: VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
282 Comments: WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
283 Comments: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
284 Comments: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
285 Comments: ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
286 Comments: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
287 Comments: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
288 Comments: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
289 Comments: dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
290 Comments: eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
291 Comments: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
292 Comments: gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
293 Comments: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
294 Comments: iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
295 Comments: jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
296 Comments: kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
297 Comments: llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
298 Comments: mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
299 Comments: nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
300 Comments: oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
301 Comments: pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
302 Comments: qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
303 Comments: rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
304 Comments: ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
305 Comments: tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
306 Comments: uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
307 Comments: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
308 Comments: wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
309 Comments: This is it, the line with the 8193'rd character of ':'.
310 Comments: From somewhere
311 From: No Such User <nosuch@example.com>
312 To: Some Other User <someother@example.com>
313 Subject: all that and nothing to say?
314 Date: Thu, 10 Jan 2013 19:54:01 -0500
318 run_test
'scan -width 60 -file '"$MH_TEST_DIR/mess" \
319 ' 1 01/10 No Such User all that and nothing to say?'
320 rm -f "$MH_TEST_DIR/mess"
322 # check m_getfld() handling of fields with trailing whitespace
323 start_test
"m_getfld() handling of fields with trailing whitespace"
324 # Even though header field names aren't supposed to have spaces (RFC
325 # 28220, m_getfld () trims trailing whitespace from them.
326 cat >`mhpath new` <<EOF
327 Date : Sun, 18 Dec 2005 00:52:39 +0100
328 From : foo@example.edu
332 run_test
'scan last' ' 12 12/18 foo@example.edu test'
334 # check header field body with more than 511 characters
335 start_test
"header field body with more than 511 characters"
336 cat >"$MH_TEST_DIR/mess" <<EOF
337 Comments: The important characteristic of this message is that this header
338 field body is more than 511 bytes long. That tests the logic in
339 m_getfld () for transitioning to the FLDPLUS state. This is the
340 only use for the FLDPLUS state, handling header field bodies that
341 are longer than the buffer used to retrieve them. The trailing
342 newline after the last character is the 512th character. The 511th
343 character, counting all spaces, even the leading one, is*
344 From: No Such User <nosuch@example.com>
345 To: Some Other User <someother@example.com>
346 Subject: FLDPLUS test
347 Date: Wed, 16 Jan 2013 20:33:58 -0600
351 run_test
'scan -width 80 -file '"$MH_TEST_DIR"'/mess' \
352 ' 1 01/16 No Such User FLDPLUS test'
353 rm -f "$MH_TEST_DIR/mess"
355 # check inc of message with header field body with more than 511 characters
356 start_test
"inc of message with header field body with more than 511 characters"
357 cat >"$expected" <<EOF
358 Comments: The important characteristic of this message is that this header
359 field body is more than 511 bytes long. That tests the logic in
360 m_getfld () for transitioning to the FLDPLUS state. This is the
361 only use for the FLDPLUS state, handling header field bodies that
362 are longer than the buffer used to retrieve them. The trailing
363 newline after the last character is the 512th character. The 511th
364 character, counting all spaces, even the leading one, is*
365 And, it continues onto this line.
366 From: No Such User <nosuch@example.com>
367 To: Some Other User <someother@example.com>
368 Subject: FLDPLUS test
369 Date: Wed, 16 Jan 2013 20:33:58 -0600
372 cat >"$MH_TEST_DIR/mess" <<EOF
373 From nosuch@example.com Wed 16 Jan 2013 20:33:58 -0600
374 Comments: The important characteristic of this message is that this header
375 field body is more than 511 bytes long. That tests the logic in
376 m_getfld () for transitioning to the FLDPLUS state. This is the
377 only use for the FLDPLUS state, handling header field bodies that
378 are longer than the buffer used to retrieve them. The trailing
379 newline after the last character is the 512th character. The 511th
380 character, counting all spaces, even the leading one, is*
381 And, it continues onto this line.
382 From: No Such User <nosuch@example.com>
383 To: Some Other User <someother@example.com>
384 Subject: FLDPLUS test
385 Date: Wed, 16 Jan 2013 20:33:58 -0600
388 run_prog inc
-file "$MH_TEST_DIR/mess" >/dev
/null
389 check
"$expected" `mhpath last` || rmm last
390 rm -f "$MH_TEST_DIR/mess"
392 # check scan and inc of mbox with multiple messages
393 start_test
"scan and inc of mbox with multiple messages"
394 echo y
| packf
-file "$MH_TEST_DIR/msgbox"
395 run_test
"scan -width 80 -file $MH_TEST_DIR/msgbox" \
396 ' 1 09/29 Test1 Testing message 1<<This is message number 1 >>
397 2 09/29 Test2 Testing message 2<<This is message number 2 >>
398 3 09/29 Test3 Testing message 3<<This is message number 3 >>
399 4 09/29 Test4 Testing message 4<<This is message number 4 >>
400 5 09/29 Test5 Testing message 5<<This is message number 5 >>
401 6 09/29 Test6 Testing message 6<<This is message number 6 >>
402 7 09/29 Test7 Testing message 7<<This is message number 7 >>
403 8 09/29 Test8 Testing message 8<<This is message number 8 >>
404 9 09/29 Test9 Testing message 9<<This is message number 9 >>
405 10 09/29 Test10 Testing message 10<<This is message number 10 >>
406 11 03/01 Mr Nobody Who is on first?<<Abbott: Every dollar of it. And
407 12 12/18 foo@example.edu test'
408 run_test
"inc -width 80 -file $MH_TEST_DIR/msgbox -truncate" \
409 'Incorporating new mail into inbox...
411 13+ 09/29 Test1 Testing message 1<<This is message number 1 >>
412 14 09/29 Test2 Testing message 2<<This is message number 2 >>
413 15 09/29 Test3 Testing message 3<<This is message number 3 >>
414 16 09/29 Test4 Testing message 4<<This is message number 4 >>
415 17 09/29 Test5 Testing message 5<<This is message number 5 >>
416 18 09/29 Test6 Testing message 6<<This is message number 6 >>
417 19 09/29 Test7 Testing message 7<<This is message number 7 >>
418 20 09/29 Test8 Testing message 8<<This is message number 8 >>
419 21 09/29 Test9 Testing message 9<<This is message number 9 >>
420 22 09/29 Test10 Testing message 10<<This is message number 10 >>
421 23 03/01 Mr Nobody Who is on first?<<Abbott: Every dollar of it. And
422 24 12/18 foo@example.edu test'
423 rm -f "$MH_TEST_DIR/msgbox"
425 # check mbox with two blank lines between header and body
426 start_test
"mbox with two blank lines between header and body"
427 cat >>"$MH_TEST_DIR/msgbox" <<EOF
429 Date: Mon, 15 Apr 2013 21:02:12 -0500
436 run_test
"inc -width 60 -file $MH_TEST_DIR/msgbox -truncate" \
437 'Incorporating new mail into inbox...
439 25+ 04/15 me@example.com <<test >>'
440 rm -f "$MH_TEST_DIR/msgbox"
442 # check inc (m_getfld, actually) of very, very, very short message
443 start_test
"inc (m_getfld, actually) of very, very, very short message"
444 cat >>"$MH_TEST_DIR/msgbox" <<EOF
446 Date: Tue, 6 Sep 2016 08:52:32 -0400
452 run_test
"inc -width 50 -file $MH_TEST_DIR/msgbox -truncate" \
453 'Incorporating new mail into inbox...
455 26+ 09/06 me@example.com <<a >>'
456 rm -f "$MH_TEST_DIR/msgbox"
458 # check inc (m_getfld, actually) of very, very short message
459 start_test
"inc (m_getfld, actually) of very, very short message"
460 cat >>"$MH_TEST_DIR/msgbox" <<EOF
462 Date: Tue, 6 Sep 2016 08:52:32 -0400
468 run_test
"inc -width 50 -file $MH_TEST_DIR/msgbox -truncate" \
469 'Incorporating new mail into inbox...
471 27+ 09/06 me@example.com <<ab >>'
472 rm -f "$MH_TEST_DIR/msgbox"
474 # check inc (m_getfld, actually) of very short message
475 start_test
"inc (m_getfld, actually) of very short message"
476 cat >>"$MH_TEST_DIR/msgbox" <<EOF
478 Date: Tue, 6 Sep 2016 08:52:32 -0400
484 run_test
"inc -width 50 -file $MH_TEST_DIR/msgbox -truncate" \
485 'Incorporating new mail into inbox...
487 28+ 09/06 me@example.com <<abc >>'
488 rm -f "$MH_TEST_DIR/msgbox"
490 # check inc (m_getfld, actually) of short message
491 start_test
"inc (m_getfld, actually) of short message"
492 cat >>"$MH_TEST_DIR/msgbox" <<EOF
494 Date: Tue, 6 Sep 2016 08:52:32 -0400
500 run_test
"inc -width 50 -file $MH_TEST_DIR/msgbox -truncate" \
501 'Incorporating new mail into inbox...
503 29+ 09/06 me@example.com <<abcd >>'
504 rm -f "$MH_TEST_DIR/msgbox"