]> diplodocus.org Git - nmh/blob - test/mhshow/test-textcharset
update tests for new message separator header from mhshow
[nmh] / test / mhshow / test-textcharset
1 #!/bin/sh
2 ##########################################################
3 #
4 # Test display of text/plain parts with charset conversion
5 #
6 ##########################################################
7
8 set -e
9
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir=`dirname "$0"`/../..
12 MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
13 fi
14
15 . "$MH_OBJ_DIR/test/common.sh"
16
17 setup_test
18
19 if test "$ICONV_ENABLED" -eq 0; then
20 test_skip 'test-textcharset requires that nmh have been built with iconv'
21 fi
22
23 require_locale en_US.utf-8 en_US.utf8
24 LC_ALL=en_US.UTF-8; export LC_ALL
25
26 expected="$MH_TEST_DIR"/$$.expected
27 actual="$MH_TEST_DIR"/$$.actual
28
29 # check charset conversion
30 msgfile=`mhpath new`
31 msgnum=`basename $msgfile`
32 cat >"$msgfile" <<'EOF'
33 From: foo@example.edu
34 To: bar@example.edu
35 Subject: test display with charset conversion
36 MIME-Version: 1.0
37 Content-Type: text/plain; charset=windows-1252
38 Content-Transfer-Encoding: quoted-printable
39 Date: Sun, 18 Dec 2005 00:52:39 +0100
40
41 4 =F7 2 =3D 2
42 EOF
43
44 cat >"$expected" <<EOF
45 [ Message inbox:$msgnum ]
46 Date: Sun, 18 Dec 2005 00:52:39 +0100
47 To: bar@example.edu
48 From: foo@example.edu
49 Subject: test display with charset conversion
50
51 MIME-Version: 1.0
52
53 [ part - text/plain - 11B ]
54 4 ÷ 2 = 2
55 EOF
56
57 run_prog mhshow last >"$actual" 2>&1
58 check "$expected" "$actual" : check charset conversion
59
60 cat >>"$MH" <<'EOF'
61 mhshow-show-text/plain: echo %{charset}
62 EOF
63
64
65 # check expansion of %{charset} by itself
66 msgfile=`mhpath new`
67 msgnum=`basename $msgfile`
68 cat >"$msgfile" <<'EOF'
69 From: foo@example.edu
70 To: bar@example.edu
71 Subject: test display with %{charset} expansion
72 MIME-Version: 1.0
73 Content-Type: text/plain; charset=windows-1252
74 Content-Transfer-Encoding: quoted-printable
75 Date: Sun, 18 Dec 2005 00:52:39 +0100
76
77 4 =F7 2 =3D 2
78 EOF
79
80 cat >"$expected" <<EOF
81 [ Message inbox:$msgnum ]
82 Date: Sun, 18 Dec 2005 00:52:39 +0100
83 To: bar@example.edu
84 From: foo@example.edu
85 Subject: test display with %{charset} expansion
86
87 MIME-Version: 1.0
88
89 UTF-8
90 EOF
91
92 run_prog mhshow last >"$actual" 2>&1
93 check "$expected" "$actual" : check %{charset} by itself
94
95
96 # check expansion of empty %{charset} by itself
97 msgfile=`mhpath new`
98 omsgnum=$msgnum
99 msgnum=`basename $msgfile`
100 cat >"$msgfile" <<'EOF'
101 From: foo@example.edu
102 To: bar@example.edu
103 Subject: test display with empty %{charset} expansion
104 MIME-Version: 1.0
105 Content-Type: text/plain
106 Content-Transfer-Encoding: quoted-printable
107 Date: Sun, 18 Dec 2005 00:52:39 +0100
108
109 4 =F7 2 =3D 2
110 EOF
111
112 cat >"$expected" <<EOF
113 [ Message inbox:$msgnum ]
114 Date: Sun, 18 Dec 2005 00:52:39 +0100
115 To: bar@example.edu
116 From: foo@example.edu
117 Subject: test display with empty %{charset} expansion
118
119 MIME-Version: 1.0
120
121
122 EOF
123
124 run_prog mhshow last >"$actual" 2>&1
125 check "$expected" "$actual" : check empty %{charset} by itself
126
127
128 grep -v 'mhshow-show-text/plain:' "$MH" >"$MH.new"
129 mv -f "$MH.new" "$MH"
130 cat >>"$MH" <<'EOF'
131 mhshow-show-text/plain: charset=%{charset}; echo ${charset:+-I $charset}
132 EOF
133
134 # check expansion of embedded %{charset} with no text following
135 cat >"$expected" <<EOF
136 [ Message inbox:$omsgnum ]
137 Date: Sun, 18 Dec 2005 00:52:39 +0100
138 To: bar@example.edu
139 From: foo@example.edu
140 Subject: test display with %{charset} expansion
141
142 MIME-Version: 1.0
143
144 -I UTF-8
145 EOF
146
147 run_prog mhshow prev >"$actual" 2>&1 # NB: "mhshow prev" !!!
148 check "$expected" "$actual" : check embedded %{charset} with no text
149
150
151 # check expansion of empty embedded %{charset} with no text following
152 cat >"$expected" <<EOF
153 [ Message inbox:$msgnum ]
154 Date: Sun, 18 Dec 2005 00:52:39 +0100
155 To: bar@example.edu
156 From: foo@example.edu
157 Subject: test display with empty %{charset} expansion
158
159 MIME-Version: 1.0
160
161
162 EOF
163
164 run_prog mhshow last >"$actual" 2>&1
165 check "$expected" "$actual" : check empty embedded %{charset} with no text following
166
167
168 sed -e 's%\(mhshow-show-text/plain:.*\)%\1 file%' "$MH" >"$MH.new"
169 mv -f "$MH.new" "$MH"
170
171 # check expansion of embedded %{charset} with text following
172 cat >"$expected" <<EOF
173 [ Message inbox:$omsgnum ]
174 Date: Sun, 18 Dec 2005 00:52:39 +0100
175 To: bar@example.edu
176 From: foo@example.edu
177 Subject: test display with %{charset} expansion
178
179 MIME-Version: 1.0
180
181 -I UTF-8 file
182 EOF
183
184 run_prog mhshow prev >"$actual" 2>&1 # NB: "mhshow prev" !!!
185 check "$expected" "$actual" : check embedded %{charset} with text following
186
187
188 # check expansion of empty embedded %{charset} with text following
189 cat >"$expected" <<EOF
190 [ Message inbox:$msgnum ]
191 Date: Sun, 18 Dec 2005 00:52:39 +0100
192 To: bar@example.edu
193 From: foo@example.edu
194 Subject: test display with empty %{charset} expansion
195
196 MIME-Version: 1.0
197
198 file
199 EOF
200
201 run_prog mhshow last >"$actual" 2>&1
202 check "$expected" "$actual" : check empty embedded %{charset} with text following
203
204
205 sed -e 's/charset/method/g' "$MH" >"$MH.new"
206 mv -f "$MH.new" "$MH"
207
208 # check parameter value quoting
209 msgfile=`mhpath new`
210 msgnum=`basename $msgfile`
211 cat >"$msgfile" <<'EOF'
212 From: foo@example.edu
213 To: bar@example.edu
214 Subject: test C-T parameter expansion quoting
215 MIME-Version: 1.0
216 Content-Type: text/plain; method=$QUOTEME'
217 Content-Transfer-Encoding: quoted-printable
218 Date: Sun, 18 Dec 2005 00:52:39 +0100
219
220 4 =F7 2 =3D 2
221 EOF
222
223 cat >"$expected" <<EOF
224 [ Message inbox:$msgnum ]
225 EOF
226 cat >>"$expected" <<'EOF'
227 Date: Sun, 18 Dec 2005 00:52:39 +0100
228 To: bar@example.edu
229 From: foo@example.edu
230 Subject: test C-T parameter expansion quoting
231
232 MIME-Version: 1.0
233
234 -I $QUOTEME' file
235 EOF
236
237 run_prog mhshow last >"$actual" 2>&1
238 check "$expected" "$actual" : check parameter value quoting
239
240
241 sed -e 's/method/unknown/g' "$MH" >"$MH.new"
242 mv -f "$MH.new" "$MH"
243
244 # check that unknown parameter is not expanded
245 msgfile=`mhpath new`
246 msgnum=`basename $msgfile`
247 cat >"$msgfile" <<'EOF'
248 From: foo@example.edu
249 To: bar@example.edu
250 Subject: test display with unknown C-T parameter expansion
251 MIME-Version: 1.0
252 Content-Type: text/plain; charset=windows-1252
253 Content-Transfer-Encoding: quoted-printable
254 Date: Sun, 18 Dec 2005 00:52:39 +0100
255
256 4 =F7 2 =3D 2
257 EOF
258
259 cat >"$expected" <<EOF
260 [ Message inbox:$msgnum ]
261 Date: Sun, 18 Dec 2005 00:52:39 +0100
262 To: bar@example.edu
263 From: foo@example.edu
264 Subject: test display with unknown C-T parameter expansion
265
266 MIME-Version: 1.0
267
268 file
269 EOF
270
271 run_prog mhshow last >"$actual" 2>&1
272 check "$expected" "$actual" : check unknown parameter is not expanded
273
274
275 grep -v '^mhshow-show-text/plain: ' "$MH" >>"$MH.new"
276 mv -f "$MH.new" "$MH"
277 cat >>"$MH" <<EOF
278 mhshow-show-text/plain: true '%F' %F
279 EOF
280
281 # check parameter value quoting with text following
282 msgfile=`mhpath new`
283 msgnum=`basename $msgfile`
284 cat >"$msgfile" <<'EOF'
285 From: foo@example.edu
286 To: bar@example.edu
287 Subject: check parameter value quoting with text following
288 MIME-Version: 1.0
289 Content-Type: text/plain
290 Date: Sun, 18 Dec 2005 00:52:39 +0100
291
292 This is a test.
293 EOF
294
295 cat >"$expected" <<EOF
296 [ Message inbox:$msgnum ]
297 Date: Sun, 18 Dec 2005 00:52:39 +0100
298 To: bar@example.edu
299 From: foo@example.edu
300 Subject: check parameter value quoting with text following
301
302 MIME-Version: 1.0
303
304 EOF
305
306 run_prog mhshow last >"$actual" 2>&1
307 check "$expected" "$actual" : parameter value quoting with text following
308
309 #
310 # test a large file that needs to be converted to UTF-8
311 #
312
313 grep -v '^mhshow-show-text/plain: ' "$MH" >>"$MH.new"
314 mv -f "$MH.new" "$MH"
315 msgfile=`mhpath new`
316 msgnum=`basename $msgfile`
317 cat >"$msgfile" <<'EOF'
318 From: foo@example.edu
319 To: bar@example.edu
320 Subject: check charset conversion of a large file
321 MIME-Version: 1.0
322 Content-Type: text/plain; charset="windows-1252"
323 Content-Transfer-Encoding: quoted-printable
324 Date: Sun, 18 Dec 2005 00:52:39 +0100
325
326 1. The Earthquake
327
328
329 The train from 'Frisco was very late. It should have arrived at
330 Hugson's Siding at midnight, but it was already five o'clock and the
331 gray dawn was breaking in the east when the little train slowly rumbled
332 up to the open shed that served for the station-house. As it came to a
333 stop the conductor called out in a loud voice:
334
335 =93Hugson's Siding!=94
336
337 At once a little girl rose from her seat and walked to the door of the
338 car, carrying a wicker suit-case in one hand and a round bird-cage
339 covered up with newspapers in the other, while a parasol was tucked
340 under her arm. The conductor helped her off the car and then the
341 engineer started his train again, so that it puffed and groaned and
342 moved slowly away up the track. The reason he was so late was because
343 all through the night there were times when the solid earth shook and
344 trembled under him, and the engineer was afraid that at any moment the
345 rails might spread apart and an accident happen to his passengers. So
346 he moved the cars slowly and with caution.
347
348 The little girl stood still to watch until the train had disappeared
349 around a curve; then she turned to see where she was.
350
351 The shed at Hugson's Siding was bare save for an old wooden bench, and
352 did not look very inviting. As she peered through the soft gray light
353 not a house of any sort was visible near the station, nor was any
354 person in sight; but after a while the child discovered a horse and
355 buggy standing near a group of trees a short distance away. She walked
356 toward it and found the horse tied to a tree and standing motionless,
357 with its head hanging down almost to the ground. It was a big horse,
358 tall and bony, with long legs and large knees and feet. She could
359 count his ribs easily where they showed through the skin of his body,
360 and his head was long and seemed altogether too big for him, as if it
361 did not fit. His tail was short and scraggly, and his harness had been
362 broken in many places and fastened together again with cords and bits
363 of wire. The buggy seemed almost new, for it had a shiny top and side
364 curtains. Getting around in front, so that she could look inside, the
365 girl saw a boy curled up on the seat, fast asleep.
366
367 She set down the bird-cage and poked the boy with her parasol.
368 Presently he woke up, rose to a sitting position and rubbed his eyes
369 briskly.
370
371 =93Hello!=94 he said, seeing her, =93are you Dorothy Gale?=94
372
373 =93Yes,=94 she answered, looking gravely at his tousled hair and blinking
374 gray eyes. =93Have you come to take me to Hugson's Ranch?=94
375
376 =93Of course,=94 he answered. =93Train in?=94
377
378 =93I couldn't be here if it wasn't,=94 she said.
379
380 He laughed at that, and his laugh was merry and frank. Jumping out of
381 the buggy he put Dorothy's suit-case under the seat and her bird-cage
382 on the floor in front.
383
384 =93Canary-birds?=94 he asked.
385
386 =93Oh no; it's just Eureka, my kitten. I thought that was the best way
387 to carry her.=94
388
389 The boy nodded.
390
391 =93Eureka's a funny name for a cat,=94 he remarked.
392
393 =93I named my kitten that because I found it,=94 she explained. =93Uncle
394 Henry says 'Eureka' means 'I have found it.'=94
395
396 =93All right; hop in.=94
397
398 She climbed into the buggy and he followed her. Then the boy picked up
399 the reins, shook them, and said =93Gid-dap!=94
400
401 The horse did not stir. Dorothy thought he just wiggled one of his
402 drooping ears, but that was all.
403
404 =93Gid-dap!=94 called the boy, again.
405
406 The horse stood still.
407
408 =93Perhaps,=94 said Dorothy, =93if you untied him, he would go.=94
409
410 The boy laughed cheerfully and jumped out.
411
412 =93Guess I'm half asleep yet,=94 he said, untying the horse. =93But Jim
413 knows his business all right--don't you, Jim?=94 patting the long nose of
414 the animal.
415
416 Then he got into the buggy again and took the reins, and the horse at
417 once backed away from the tree, turned slowly around, and began to trot
418 down the sandy road which was just visible in the dim light.
419
420 =93Thought that train would never come,=94 observed the boy. =93I've wait=
421 ed
422 at that station for five hours.=94
423
424 =93We had a lot of earthquakes,=94 said Dorothy. =93Didn't you feel the
425 ground shake?=94
426
427 =93Yes; but we're used to such things in California,=94 he replied. =93Th=
428 ey
429 don't scare us much.=94
430
431 =93The conductor said it was the worst quake he ever knew.=94
432
433 =93Did he? Then it must have happened while I was asleep,=94 he said
434 thoughtfully.
435
436 =93How is Uncle Henry?=94 she enquired, after a pause during which the
437 horse continued to trot with long, regular strides.
438
439 =93He's pretty well. He and Uncle Hugson have been having a fine visit.=94
440
441 =93Is Mr. Hugson your uncle?=94 she asked.
442
443 =93Yes. Uncle Bill Hugson married your Uncle Henry's wife's sister; so
444 we must be second cousins,=94 said the boy, in an amused tone. =93I work
445 for Uncle Bill on his ranch, and he pays me six dollars a month and my
446 board.=94
447
448 =93Isn't that a great deal?=94 she asked, doubtfully.
449
450 =93Why, it's a great deal for Uncle Hugson, but not for me. I'm a
451 splendid worker. I work as well as I sleep,=94 he added, with a laugh.
452
453 =93What is your name?=94 said Dorothy, thinking she liked the boy's manner
454 and the cheery tone of his voice.
455
456 =93Not a very pretty one,=94 he answered, as if a little ashamed. =93My
457 whole name is Zebediah; but folks just call me 'Zeb.' You've been to
458 Australia, haven't you?=94
459
460 =93Yes; with Uncle Henry,=94 she answered. =93We got to San Francisco a w=
461 eek
462 ago, and Uncle Henry went right on to Hugson's Ranch for a visit while
463 I stayed a few days in the city with some friends we had met.=94
464
465 =93How long will you be with us?=94 he asked.
466
467 =93Only a day. Tomorrow Uncle Henry and I must start back for Kansas.
468 We've been away for a long time, you know, and so we're anxious to get
469 home again.=94
470
471 The boy flicked the big, boney horse with his whip and looked
472 thoughtful. Then he started to say something to his little companion,
473 but before he could speak the buggy began to sway dangerously from side
474 to side and the earth seemed to rise up before them. Next minute there
475 was a roar and a sharp crash, and at her side Dorothy saw the ground
476 open in a wide crack and then come together again.
477
478 =93Goodness!=94 she cried, grasping the iron rail of the seat. =93What wa=
479 s
480 that?=94
481
482 =93That was an awful big quake,=94 replied Zeb, with a white face. =93It
483 almost got us that time, Dorothy.=94
484
485 The horse had stopped short, and stood firm as a rock. Zeb shook the
486 reins and urged him to go, but Jim was stubborn. Then the boy cracked
487 his whip and touched the animal's flanks with it, and after a low moan
488 of protest Jim stepped slowly along the road.
489
490 Neither the boy nor the girl spoke again for some minutes. There was a
491 breath of danger in the very air, and every few moments the earth would
492 shake violently. Jim's ears were standing erect upon his head and
493 every muscle of his big body was tense as he trotted toward home. He
494 was not going very fast, but on his flanks specks of foam began to
495 appear and at times he would tremble like a leaf.
496
497 The sky had grown darker again and the wind made queer sobbing sounds
498 as it swept over the valley.
499
500 Suddenly there was a rending, tearing sound, and the earth split into
501 another great crack just beneath the spot where the horse was standing.
502 With a wild neigh of terror the animal fell bodily into the pit,
503 drawing the buggy and its occupants after him.
504
505 Dorothy grabbed fast hold of the buggy top and the boy did the same.
506 The sudden rush into space confused them so that they could not think.
507
508 Blackness engulfed them on every side, and in breathless silence they
509 waited for the fall to end and crush them against jagged rocks or for
510 the earth to close in on them again and bury them forever in its
511 dreadful depths.
512
513 The horrible sensation of falling, the darkness and the terrifying
514 noises, proved more than Dorothy could endure and for a few moments the
515 little girl lost consciousness. Zeb, being a boy, did not faint, but
516 he was badly frightened, and clung to the buggy seat with a tight grip,
517 expecting every moment would be his last.
518
519
520
521
522 2. The Glass City
523
524
525 When Dorothy recovered her senses they were still falling, but not so
526 fast. The top of the buggy caught the air like a parachute or an
527 umbrella filled with wind, and held them back so that they floated
528 downward with a gentle motion that was not so very disagreeable to
529 bear. The worst thing was their terror of reaching the bottom of this
530 great crack in the earth, and the natural fear that sudden death was
531 about to overtake them at any moment. Crash after crash echoed far
532 above their heads, as the earth came together where it had split, and
533 stones and chunks of clay rattled around them on every side. These
534 they could not see, but they could feel them pelting the buggy top, and
535 Jim screamed almost like a human being when a stone overtook him and
536 struck his boney body. They did not really hurt the poor horse,
537 because everything was falling together; only the stones and rubbish
538 fell faster than the horse and buggy, which were held back by the
539 pressure of the air, so that the terrified animal was actually more
540 frightened than he was injured.
541
542 How long this state of things continued Dorothy could not even guess,
543 she was so greatly bewildered. But bye and bye, as she stared ahead
544 into the black chasm with a beating heart, she began to dimly see the
545 form of the horse Jim--his head up in the air, his ears erect and his
546 long legs sprawling in every direction as he tumbled through space.
547 Also, turning her head, she found that she could see the boy beside
548 her, who had until now remained as still and silent as she herself.
549
550 Dorothy sighed and commenced to breathe easier. She began to realize
551 that death was not in store for her, after all, but that she had merely
552 started upon another adventure, which promised to be just as queer and
553 unusual as were those she had before encountered.
554
555 With this thought in mind the girl took heart and leaned her head over
556 the side of the buggy to see where the strange light was coming from.
557 Far below her she found six great glowing balls suspended in the air.
558 The central and largest one was white, and reminded her of the sun.
559 Around it were arranged, like the five points of a star, the other five
560 brilliant balls; one being rose colored, one violet, one yellow, one
561 blue and one orange. This splendid group of colored suns sent rays
562 darting in every direction, and as the horse and buggy--with Dorothy
563 and Zeb--sank steadily downward and came nearer to the lights, the rays
564 began to take on all the delicate tintings of a rainbow, growing more
565 and more distinct every moment until all the space was brilliantly
566 illuminated.
567
568 Dorothy was too dazed to say much, but she watched one of Jim's big
569 ears turn to violet and the other to rose, and wondered that his tail
570 should be yellow and his body striped with blue and orange like the
571 stripes of a zebra. Then she looked at Zeb, whose face was blue and
572 whose hair was pink, and gave a little laugh that sounded a bit nervous.
573
574 =93Isn't it funny?=94 she said.
575
576 The boy was startled and his eyes were big. Dorothy had a green streak
577 through the center of her face where the blue and yellow lights came
578 together, and her appearance seemed to add to his fright.
579
580 =93I--I don't s-s-see any-thing funny--'bout it!=94 he stammered.
581
582 Just then the buggy tipped slowly over upon its side, the body of the
583 horse tipping also. But they continued to fall, all together, and the
584 boy and girl had no difficulty in remaining upon the seat, just as they
585 were before. Then they turned bottom side up, and continued to roll
586 slowly over until they were right side up again. During this time Jim
587 struggled frantically, all his legs kicking the air; but on finding
588 himself in his former position the horse said, in a relieved tone of
589 voice:
590
591 =93Well, that's better!=94
592
593 Dorothy and Zeb looked at one another in wonder.
594
595 =93Can your horse talk?=94 she asked.
596
597 =93Never knew him to, before,=94 replied the boy.
598
599 =93Those were the first words I ever said,=94 called out the horse, who ha=
600 d
601 overheard them, =93and I can't explain why I happened to speak then.
602 This is a nice scrape you've got me into, isn't it?=94
603
604 =93As for that, we are in the same scrape ourselves,=94 answered Dorothy,
605 cheerfully. =93But never mind; something will happen pretty soon.=94
606
607 =93Of course,=94 growled the horse, =93and then we shall be sorry it
608 happened.=94
609
610 Zeb gave a shiver. All this was so terrible and unreal that he could
611 not understand it at all, and so had good reason to be afraid.
612
613 Swiftly they drew near to the flaming colored suns, and passed close
614 beside them. The light was then so bright that it dazzled their eyes,
615 and they covered their faces with their hands to escape being blinded.
616 There was no heat in the colored suns, however, and after they had
617 passed below them the top of the buggy shut out many of the piercing
618 rays so that the boy and girl could open their eyes again.
619
620 =93We've got to come to the bottom some time,=94 remarked Zeb, with a deep
621 sigh. =93We can't keep falling forever, you know.=94
622
623 =93Of course not,=94 said Dorothy. =93We are somewhere in the middle of t=
624 he
625 earth, and the chances are we'll reach the other side of it before
626 long. But it's a big hollow, isn't it?=94
627
628 =93Awful big!=94 answered the boy.
629
630 =93We're coming to something now,=94 announced the horse.
631
632 At this they both put their heads over the side of the buggy and looked
633 down. Yes; there was land below them; and not so very far away,
634 either. But they were floating very, very slowly--so slowly that it
635 could no longer be called a fall--and the children had ample time to
636 take heart and look about them.
637
638 They saw a landscape with mountains and plains, lakes and rivers, very
639 like those upon the earth's surface; but all the scene was splendidly
640 colored by the variegated lights from the six suns. Here and there
641 were groups of houses that seemed made of clear glass, because they
642 sparkled so brightly.
643
644 =93I'm sure we are in no danger,=94 said Dorothy, in a sober voice. =93We
645 are falling so slowly that we can't be dashed to pieces when we land,
646 and this country that we are coming to seems quite pretty.=94
647
648 =93We'll never get home again, though!=94 declared Zeb, with a groan.
649
650 =93Oh, I'm not so sure of that,=94 replied the girl. =93But don't let us
651 worry over such things, Zeb; we can't help ourselves just now, you
652 know, and I've always been told it's foolish to borrow trouble.=94
653
654 The boy became silent, having no reply to so sensible a speech, and
655 soon both were fully occupied in staring at the strange scenes spread
656 out below them. They seemed to be falling right into the middle of a
657 big city which had many tall buildings with glass domes and
658 sharp-pointed spires. These spires were like great spear-points, and
659 if they tumbled upon one of them they were likely to suffer serious
660 injury.
661
662 Jim the horse had seen these spires, also, and his ears stood straight
663 up with fear, while Dorothy and Zeb held their breaths in suspense.
664 But no; they floated gently down upon a broad, flat roof, and came to a
665 stop at last.
666
667 When Jim felt something firm under his feet the poor beast's legs
668 trembled so much that he could hardly stand; but Zeb at once leaped out
669 of the buggy to the roof, and he was so awkward and hasty that he
670 kicked over Dorothy's bird-cage, which rolled out upon the roof so that
671 the bottom came off. At once a pink kitten crept out of the upset
672 cage, sat down upon the glass roof, and yawned and blinked its round
673 eyes.
674
675 =93Oh,=94 said Dorothy. =93There's Eureka.=94
676
677 =93First time I ever saw a pink cat,=94 said Zeb.
678
679 =93Eureka isn't pink; she's white. It's this queer light that gives her
680 that color.=94
681
682 =93Where's my milk?=94 asked the kitten, looking up into Dorothy's face.
683 =93I'm 'most starved to death.=94
684
685 =93Oh, Eureka! Can you talk?=94
686
687 =93Talk! Am I talking? Good gracious, I believe I am. Isn't it funny?=94
688 asked the kitten.
689
690 =93It's all wrong,=94 said Zeb, gravely. =93Animals ought not to talk. B=
691 ut
692 even old Jim has been saying things since we had our accident.=94
693
694 =93I can't see that it's wrong,=94 remarked Jim, in his gruff tones. =93A=
695 t
696 least, it isn't as wrong as some other things. What's going to become
697 of us now?=94
698
699 =93I don't know,=94 answered the boy, looking around him curiously.
700
701 The houses of the city were all made of glass, so clear and transparent
702 that one could look through the walls as easily as through a window.
703 Dorothy saw, underneath the roof on which she stood, several rooms used
704 for rest chambers, and even thought she could make out a number of
705 queer forms huddled into the corners of these rooms.
706
707 The roof beside them had a great hole smashed through it, and pieces of
708 glass were lying scattered in every direction. A nearby steeple had
709 been broken off short and the fragments lay heaped beside it. Other
710 buildings were cracked in places or had corners chipped off from them;
711 but they must have been very beautiful before these accidents had
712 happened to mar their perfection. The rainbow tints from the colored
713 suns fell upon the glass city softly and gave to the buildings many
714 delicate, shifting hues which were very pretty to see.
715
716 But not a sound had broken the stillness since the strangers had
717 arrived, except that of their own voices. They began to wonder if
718 there were no people to inhabit this magnificent city of the inner
719 world.
720
721 Suddenly a man appeared through a hole in the roof next to the one they
722 were on and stepped into plain view. He was not a very large man, but
723 was well formed and had a beautiful face--calm and serene as the face
724 of a fine portrait. His clothing fitted his form snugly and was
725 gorgeously colored in brilliant shades of green, which varied as the
726 sunbeams touched them but was not wholly influenced by the solar rays.
727
728 The man had taken a step or two across the glass roof before he noticed
729 the presence of the strangers; but then he stopped abruptly. There was
730 no expression of either fear or surprise upon his tranquil face, yet he
731 must have been both astonished and afraid; for after his eyes had
732 rested upon the ungainly form of the horse for a moment he walked
733 rapidly to the furthest edge of the roof, his head turned back over his
734 shoulder to gaze at the strange animal.
735
736 =93Look out!=94 cried Dorothy, who noticed that the beautiful man did not
737 look where he was going; =93be careful, or you'll fall off!=94
738
739 But he paid no attention to her warning. He reached the edge of the
740 tall roof, stepped one foot out into the air, and walked into space as
741 calmly as if he were on firm ground.
742
743 The girl, greatly astonished, ran to lean over the edge of the roof,
744 and saw the man walking rapidly through the air toward the ground.
745 Soon he reached the street and disappeared through a glass doorway into
746 one of the glass buildings.
747
748 =93How strange!=94 she exclaimed, drawing a long breath.
749 EOF
750
751 cat >"$expected" <<EOF
752 [ Message inbox:$msgnum ]
753 Date: Sun, 18 Dec 2005 00:52:39 +0100
754 To: bar@example.edu
755 From: foo@example.edu
756 Subject: check charset conversion of a large file
757
758 MIME-Version: 1.0
759
760 [ part - text/plain - 18.9KB ]
761 1. The Earthquake
762
763
764 The train from 'Frisco was very late. It should have arrived at
765 Hugson's Siding at midnight, but it was already five o'clock and the
766 gray dawn was breaking in the east when the little train slowly rumbled
767 up to the open shed that served for the station-house. As it came to a
768 stop the conductor called out in a loud voice:
769
770 “Hugson's Siding!”
771
772 At once a little girl rose from her seat and walked to the door of the
773 car, carrying a wicker suit-case in one hand and a round bird-cage
774 covered up with newspapers in the other, while a parasol was tucked
775 under her arm. The conductor helped her off the car and then the
776 engineer started his train again, so that it puffed and groaned and
777 moved slowly away up the track. The reason he was so late was because
778 all through the night there were times when the solid earth shook and
779 trembled under him, and the engineer was afraid that at any moment the
780 rails might spread apart and an accident happen to his passengers. So
781 he moved the cars slowly and with caution.
782
783 The little girl stood still to watch until the train had disappeared
784 around a curve; then she turned to see where she was.
785
786 The shed at Hugson's Siding was bare save for an old wooden bench, and
787 did not look very inviting. As she peered through the soft gray light
788 not a house of any sort was visible near the station, nor was any
789 person in sight; but after a while the child discovered a horse and
790 buggy standing near a group of trees a short distance away. She walked
791 toward it and found the horse tied to a tree and standing motionless,
792 with its head hanging down almost to the ground. It was a big horse,
793 tall and bony, with long legs and large knees and feet. She could
794 count his ribs easily where they showed through the skin of his body,
795 and his head was long and seemed altogether too big for him, as if it
796 did not fit. His tail was short and scraggly, and his harness had been
797 broken in many places and fastened together again with cords and bits
798 of wire. The buggy seemed almost new, for it had a shiny top and side
799 curtains. Getting around in front, so that she could look inside, the
800 girl saw a boy curled up on the seat, fast asleep.
801
802 She set down the bird-cage and poked the boy with her parasol.
803 Presently he woke up, rose to a sitting position and rubbed his eyes
804 briskly.
805
806 “Hello!” he said, seeing her, “are you Dorothy Gale?”
807
808 “Yes,” she answered, looking gravely at his tousled hair and blinking
809 gray eyes. “Have you come to take me to Hugson's Ranch?”
810
811 “Of course,” he answered. “Train in?”
812
813 “I couldn't be here if it wasn't,” she said.
814
815 He laughed at that, and his laugh was merry and frank. Jumping out of
816 the buggy he put Dorothy's suit-case under the seat and her bird-cage
817 on the floor in front.
818
819 “Canary-birds?” he asked.
820
821 “Oh no; it's just Eureka, my kitten. I thought that was the best way
822 to carry her.”
823
824 The boy nodded.
825
826 “Eureka's a funny name for a cat,” he remarked.
827
828 “I named my kitten that because I found it,” she explained. “Uncle
829 Henry says 'Eureka' means 'I have found it.'”
830
831 “All right; hop in.”
832
833 She climbed into the buggy and he followed her. Then the boy picked up
834 the reins, shook them, and said “Gid-dap!”
835
836 The horse did not stir. Dorothy thought he just wiggled one of his
837 drooping ears, but that was all.
838
839 “Gid-dap!” called the boy, again.
840
841 The horse stood still.
842
843 “Perhaps,” said Dorothy, “if you untied him, he would go.”
844
845 The boy laughed cheerfully and jumped out.
846
847 “Guess I'm half asleep yet,” he said, untying the horse. “But Jim
848 knows his business all right--don't you, Jim?” patting the long nose of
849 the animal.
850
851 Then he got into the buggy again and took the reins, and the horse at
852 once backed away from the tree, turned slowly around, and began to trot
853 down the sandy road which was just visible in the dim light.
854
855 “Thought that train would never come,” observed the boy. “I've waited
856 at that station for five hours.”
857
858 “We had a lot of earthquakes,” said Dorothy. “Didn't you feel the
859 ground shake?”
860
861 “Yes; but we're used to such things in California,” he replied. “They
862 don't scare us much.”
863
864 “The conductor said it was the worst quake he ever knew.”
865
866 “Did he? Then it must have happened while I was asleep,” he said
867 thoughtfully.
868
869 “How is Uncle Henry?” she enquired, after a pause during which the
870 horse continued to trot with long, regular strides.
871
872 “He's pretty well. He and Uncle Hugson have been having a fine visit.”
873
874 “Is Mr. Hugson your uncle?” she asked.
875
876 “Yes. Uncle Bill Hugson married your Uncle Henry's wife's sister; so
877 we must be second cousins,” said the boy, in an amused tone. “I work
878 for Uncle Bill on his ranch, and he pays me six dollars a month and my
879 board.”
880
881 “Isn't that a great deal?” she asked, doubtfully.
882
883 “Why, it's a great deal for Uncle Hugson, but not for me. I'm a
884 splendid worker. I work as well as I sleep,” he added, with a laugh.
885
886 “What is your name?” said Dorothy, thinking she liked the boy's manner
887 and the cheery tone of his voice.
888
889 “Not a very pretty one,” he answered, as if a little ashamed. “My
890 whole name is Zebediah; but folks just call me 'Zeb.' You've been to
891 Australia, haven't you?”
892
893 “Yes; with Uncle Henry,” she answered. “We got to San Francisco a week
894 ago, and Uncle Henry went right on to Hugson's Ranch for a visit while
895 I stayed a few days in the city with some friends we had met.”
896
897 “How long will you be with us?” he asked.
898
899 “Only a day. Tomorrow Uncle Henry and I must start back for Kansas.
900 We've been away for a long time, you know, and so we're anxious to get
901 home again.”
902
903 The boy flicked the big, boney horse with his whip and looked
904 thoughtful. Then he started to say something to his little companion,
905 but before he could speak the buggy began to sway dangerously from side
906 to side and the earth seemed to rise up before them. Next minute there
907 was a roar and a sharp crash, and at her side Dorothy saw the ground
908 open in a wide crack and then come together again.
909
910 “Goodness!” she cried, grasping the iron rail of the seat. “What was
911 that?”
912
913 “That was an awful big quake,” replied Zeb, with a white face. “It
914 almost got us that time, Dorothy.”
915
916 The horse had stopped short, and stood firm as a rock. Zeb shook the
917 reins and urged him to go, but Jim was stubborn. Then the boy cracked
918 his whip and touched the animal's flanks with it, and after a low moan
919 of protest Jim stepped slowly along the road.
920
921 Neither the boy nor the girl spoke again for some minutes. There was a
922 breath of danger in the very air, and every few moments the earth would
923 shake violently. Jim's ears were standing erect upon his head and
924 every muscle of his big body was tense as he trotted toward home. He
925 was not going very fast, but on his flanks specks of foam began to
926 appear and at times he would tremble like a leaf.
927
928 The sky had grown darker again and the wind made queer sobbing sounds
929 as it swept over the valley.
930
931 Suddenly there was a rending, tearing sound, and the earth split into
932 another great crack just beneath the spot where the horse was standing.
933 With a wild neigh of terror the animal fell bodily into the pit,
934 drawing the buggy and its occupants after him.
935
936 Dorothy grabbed fast hold of the buggy top and the boy did the same.
937 The sudden rush into space confused them so that they could not think.
938
939 Blackness engulfed them on every side, and in breathless silence they
940 waited for the fall to end and crush them against jagged rocks or for
941 the earth to close in on them again and bury them forever in its
942 dreadful depths.
943
944 The horrible sensation of falling, the darkness and the terrifying
945 noises, proved more than Dorothy could endure and for a few moments the
946 little girl lost consciousness. Zeb, being a boy, did not faint, but
947 he was badly frightened, and clung to the buggy seat with a tight grip,
948 expecting every moment would be his last.
949
950
951
952
953 2. The Glass City
954
955
956 When Dorothy recovered her senses they were still falling, but not so
957 fast. The top of the buggy caught the air like a parachute or an
958 umbrella filled with wind, and held them back so that they floated
959 downward with a gentle motion that was not so very disagreeable to
960 bear. The worst thing was their terror of reaching the bottom of this
961 great crack in the earth, and the natural fear that sudden death was
962 about to overtake them at any moment. Crash after crash echoed far
963 above their heads, as the earth came together where it had split, and
964 stones and chunks of clay rattled around them on every side. These
965 they could not see, but they could feel them pelting the buggy top, and
966 Jim screamed almost like a human being when a stone overtook him and
967 struck his boney body. They did not really hurt the poor horse,
968 because everything was falling together; only the stones and rubbish
969 fell faster than the horse and buggy, which were held back by the
970 pressure of the air, so that the terrified animal was actually more
971 frightened than he was injured.
972
973 How long this state of things continued Dorothy could not even guess,
974 she was so greatly bewildered. But bye and bye, as she stared ahead
975 into the black chasm with a beating heart, she began to dimly see the
976 form of the horse Jim--his head up in the air, his ears erect and his
977 long legs sprawling in every direction as he tumbled through space.
978 Also, turning her head, she found that she could see the boy beside
979 her, who had until now remained as still and silent as she herself.
980
981 Dorothy sighed and commenced to breathe easier. She began to realize
982 that death was not in store for her, after all, but that she had merely
983 started upon another adventure, which promised to be just as queer and
984 unusual as were those she had before encountered.
985
986 With this thought in mind the girl took heart and leaned her head over
987 the side of the buggy to see where the strange light was coming from.
988 Far below her she found six great glowing balls suspended in the air.
989 The central and largest one was white, and reminded her of the sun.
990 Around it were arranged, like the five points of a star, the other five
991 brilliant balls; one being rose colored, one violet, one yellow, one
992 blue and one orange. This splendid group of colored suns sent rays
993 darting in every direction, and as the horse and buggy--with Dorothy
994 and Zeb--sank steadily downward and came nearer to the lights, the rays
995 began to take on all the delicate tintings of a rainbow, growing more
996 and more distinct every moment until all the space was brilliantly
997 illuminated.
998
999 Dorothy was too dazed to say much, but she watched one of Jim's big
1000 ears turn to violet and the other to rose, and wondered that his tail
1001 should be yellow and his body striped with blue and orange like the
1002 stripes of a zebra. Then she looked at Zeb, whose face was blue and
1003 whose hair was pink, and gave a little laugh that sounded a bit nervous.
1004
1005 “Isn't it funny?” she said.
1006
1007 The boy was startled and his eyes were big. Dorothy had a green streak
1008 through the center of her face where the blue and yellow lights came
1009 together, and her appearance seemed to add to his fright.
1010
1011 “I--I don't s-s-see any-thing funny--'bout it!” he stammered.
1012
1013 Just then the buggy tipped slowly over upon its side, the body of the
1014 horse tipping also. But they continued to fall, all together, and the
1015 boy and girl had no difficulty in remaining upon the seat, just as they
1016 were before. Then they turned bottom side up, and continued to roll
1017 slowly over until they were right side up again. During this time Jim
1018 struggled frantically, all his legs kicking the air; but on finding
1019 himself in his former position the horse said, in a relieved tone of
1020 voice:
1021
1022 “Well, that's better!”
1023
1024 Dorothy and Zeb looked at one another in wonder.
1025
1026 “Can your horse talk?” she asked.
1027
1028 “Never knew him to, before,” replied the boy.
1029
1030 “Those were the first words I ever said,” called out the horse, who had
1031 overheard them, “and I can't explain why I happened to speak then.
1032 This is a nice scrape you've got me into, isn't it?”
1033
1034 “As for that, we are in the same scrape ourselves,” answered Dorothy,
1035 cheerfully. “But never mind; something will happen pretty soon.”
1036
1037 “Of course,” growled the horse, “and then we shall be sorry it
1038 happened.”
1039
1040 Zeb gave a shiver. All this was so terrible and unreal that he could
1041 not understand it at all, and so had good reason to be afraid.
1042
1043 Swiftly they drew near to the flaming colored suns, and passed close
1044 beside them. The light was then so bright that it dazzled their eyes,
1045 and they covered their faces with their hands to escape being blinded.
1046 There was no heat in the colored suns, however, and after they had
1047 passed below them the top of the buggy shut out many of the piercing
1048 rays so that the boy and girl could open their eyes again.
1049
1050 “We've got to come to the bottom some time,” remarked Zeb, with a deep
1051 sigh. “We can't keep falling forever, you know.”
1052
1053 “Of course not,” said Dorothy. “We are somewhere in the middle of the
1054 earth, and the chances are we'll reach the other side of it before
1055 long. But it's a big hollow, isn't it?”
1056
1057 “Awful big!” answered the boy.
1058
1059 “We're coming to something now,” announced the horse.
1060
1061 At this they both put their heads over the side of the buggy and looked
1062 down. Yes; there was land below them; and not so very far away,
1063 either. But they were floating very, very slowly--so slowly that it
1064 could no longer be called a fall--and the children had ample time to
1065 take heart and look about them.
1066
1067 They saw a landscape with mountains and plains, lakes and rivers, very
1068 like those upon the earth's surface; but all the scene was splendidly
1069 colored by the variegated lights from the six suns. Here and there
1070 were groups of houses that seemed made of clear glass, because they
1071 sparkled so brightly.
1072
1073 “I'm sure we are in no danger,” said Dorothy, in a sober voice. “We
1074 are falling so slowly that we can't be dashed to pieces when we land,
1075 and this country that we are coming to seems quite pretty.”
1076
1077 “We'll never get home again, though!” declared Zeb, with a groan.
1078
1079 “Oh, I'm not so sure of that,” replied the girl. “But don't let us
1080 worry over such things, Zeb; we can't help ourselves just now, you
1081 know, and I've always been told it's foolish to borrow trouble.”
1082
1083 The boy became silent, having no reply to so sensible a speech, and
1084 soon both were fully occupied in staring at the strange scenes spread
1085 out below them. They seemed to be falling right into the middle of a
1086 big city which had many tall buildings with glass domes and
1087 sharp-pointed spires. These spires were like great spear-points, and
1088 if they tumbled upon one of them they were likely to suffer serious
1089 injury.
1090
1091 Jim the horse had seen these spires, also, and his ears stood straight
1092 up with fear, while Dorothy and Zeb held their breaths in suspense.
1093 But no; they floated gently down upon a broad, flat roof, and came to a
1094 stop at last.
1095
1096 When Jim felt something firm under his feet the poor beast's legs
1097 trembled so much that he could hardly stand; but Zeb at once leaped out
1098 of the buggy to the roof, and he was so awkward and hasty that he
1099 kicked over Dorothy's bird-cage, which rolled out upon the roof so that
1100 the bottom came off. At once a pink kitten crept out of the upset
1101 cage, sat down upon the glass roof, and yawned and blinked its round
1102 eyes.
1103
1104 “Oh,” said Dorothy. “There's Eureka.”
1105
1106 “First time I ever saw a pink cat,” said Zeb.
1107
1108 “Eureka isn't pink; she's white. It's this queer light that gives her
1109 that color.”
1110
1111 “Where's my milk?” asked the kitten, looking up into Dorothy's face.
1112 “I'm 'most starved to death.”
1113
1114 “Oh, Eureka! Can you talk?”
1115
1116 “Talk! Am I talking? Good gracious, I believe I am. Isn't it funny?”
1117 asked the kitten.
1118
1119 “It's all wrong,” said Zeb, gravely. “Animals ought not to talk. But
1120 even old Jim has been saying things since we had our accident.”
1121
1122 “I can't see that it's wrong,” remarked Jim, in his gruff tones. “At
1123 least, it isn't as wrong as some other things. What's going to become
1124 of us now?”
1125
1126 “I don't know,” answered the boy, looking around him curiously.
1127
1128 The houses of the city were all made of glass, so clear and transparent
1129 that one could look through the walls as easily as through a window.
1130 Dorothy saw, underneath the roof on which she stood, several rooms used
1131 for rest chambers, and even thought she could make out a number of
1132 queer forms huddled into the corners of these rooms.
1133
1134 The roof beside them had a great hole smashed through it, and pieces of
1135 glass were lying scattered in every direction. A nearby steeple had
1136 been broken off short and the fragments lay heaped beside it. Other
1137 buildings were cracked in places or had corners chipped off from them;
1138 but they must have been very beautiful before these accidents had
1139 happened to mar their perfection. The rainbow tints from the colored
1140 suns fell upon the glass city softly and gave to the buildings many
1141 delicate, shifting hues which were very pretty to see.
1142
1143 But not a sound had broken the stillness since the strangers had
1144 arrived, except that of their own voices. They began to wonder if
1145 there were no people to inhabit this magnificent city of the inner
1146 world.
1147
1148 Suddenly a man appeared through a hole in the roof next to the one they
1149 were on and stepped into plain view. He was not a very large man, but
1150 was well formed and had a beautiful face--calm and serene as the face
1151 of a fine portrait. His clothing fitted his form snugly and was
1152 gorgeously colored in brilliant shades of green, which varied as the
1153 sunbeams touched them but was not wholly influenced by the solar rays.
1154
1155 The man had taken a step or two across the glass roof before he noticed
1156 the presence of the strangers; but then he stopped abruptly. There was
1157 no expression of either fear or surprise upon his tranquil face, yet he
1158 must have been both astonished and afraid; for after his eyes had
1159 rested upon the ungainly form of the horse for a moment he walked
1160 rapidly to the furthest edge of the roof, his head turned back over his
1161 shoulder to gaze at the strange animal.
1162
1163 “Look out!” cried Dorothy, who noticed that the beautiful man did not
1164 look where he was going; “be careful, or you'll fall off!”
1165
1166 But he paid no attention to her warning. He reached the edge of the
1167 tall roof, stepped one foot out into the air, and walked into space as
1168 calmly as if he were on firm ground.
1169
1170 The girl, greatly astonished, ran to lean over the edge of the roof,
1171 and saw the man walking rapidly through the air toward the ground.
1172 Soon he reached the street and disappeared through a glass doorway into
1173 one of the glass buildings.
1174
1175 “How strange!” she exclaimed, drawing a long breath.
1176 EOF
1177
1178 run_prog mhshow last >"$actual" 2>&1
1179 check "$expected" "$actual" : large file conversion to UTF-8
1180
1181 exit $failed