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