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