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