diff options
Diffstat (limited to 't/longout.at')
-rw-r--r-- | t/longout.at | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/t/longout.at b/t/longout.at new file mode 100644 index 0000000..45391b2 --- /dev/null +++ b/t/longout.at | |||
@@ -0,0 +1,100 @@ | |||
1 | # Testcase for runcap - run program and capture its output -*- autotest -*- | ||
2 | # Copyright (C) 2017 Sergey Poznyakoff | ||
3 | # | ||
4 | # Runcap is free software; you can redistribute it and/or modify it | ||
5 | # under the terms of the GNU General Public License as published by the | ||
6 | # Free Software Foundation; either version 3 of the License, or (at your | ||
7 | # option) any later version. | ||
8 | # | ||
9 | # Runcap is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with Runcap. If not, see <http://www.gnu.org/licenses/>. | ||
16 | |||
17 | AT_SETUP([file buffered output]) | ||
18 | AT_KEYWORDS([longout]) | ||
19 | AT_CHECK([rt -s 16 -n stdout -- genout $INPUT | ||
20 | ], | ||
21 | [0], | ||
22 | [res=0 | ||
23 | exit code: 0 | ||
24 | stdout: 71 lines, 4051 bytes | ||
25 | stderr: 0 lines, 0 bytes | ||
26 | stdout listing: | ||
27 | 1: CHAPTER I. Down the Rabbit-Hole | ||
28 | 2: | ||
29 | 3: Alice was beginning to get very tired of sitting by her sister on the | ||
30 | 4: bank, and of having nothing to do: once or twice she had peeped into the | ||
31 | 5: book her sister was reading, but it had no pictures or conversations | ||
32 | 6: in it, 'and what is the use of a book,' thought Alice 'without | ||
33 | 7: pictures or conversations?' | ||
34 | 8: | ||
35 | 9: So she was considering in her own mind (as well as she could, for the | ||
36 | 10: hot day made her feel very sleepy and stupid), whether the pleasure of | ||
37 | 11: making a daisy-chain would be worth the trouble of getting up and picking | ||
38 | 12: the daisies, when suddenly a White Rabbit with pink eyes ran close by her. | ||
39 | 13: | ||
40 | 14: There was nothing so very remarkable in that; nor did Alice think it | ||
41 | 15: so very much out of the way to hear the Rabbit say to itself, 'Oh | ||
42 | 16: dear! Oh dear! I shall be late!' (when she thought it over afterwards, | ||
43 | 17: it occurred to her that she ought to have wondered at this, but at the | ||
44 | 18: time it all seemed quite natural); but when the Rabbit actually took a | ||
45 | 19: watch out of its waistcoat-pocket, and looked at it, and then hurried on, | ||
46 | 20: Alice started to her feet, for it flashed across her mind that she had | ||
47 | 21: never before seen a rabbit with either a waistcoat-pocket, or a watch | ||
48 | 22: to take out of it, and burning with curiosity, she ran across the field | ||
49 | 23: after it, and fortunately was just in time to see it pop down a large | ||
50 | 24: rabbit-hole under the hedge. | ||
51 | 25: | ||
52 | 26: In another moment down went Alice after it, never once considering how | ||
53 | 27: in the world she was to get out again. | ||
54 | 28: | ||
55 | 29: The rabbit-hole went straight on like a tunnel for some way, and then | ||
56 | 30: dipped suddenly down, so suddenly that Alice had not a moment to think | ||
57 | 31: about stopping herself before she found herself falling down a very | ||
58 | 32: deep well. | ||
59 | 33: | ||
60 | 34: Either the well was very deep, or she fell very slowly, for she had plenty | ||
61 | 35: of time as she went down to look about her and to wonder what was going | ||
62 | 36: to happen next. First, she tried to look down and make out what she was | ||
63 | 37: coming to, but it was too dark to see anything; then she looked at the | ||
64 | 38: sides of the well, and noticed that they were filled with cupboards | ||
65 | 39: and book-shelves; here and there she saw maps and pictures hung upon | ||
66 | 40: pegs. She took down a jar from one of the shelves as she passed; it was | ||
67 | 41: labelled 'ORANGE MARMALADE', but to her great disappointment it was | ||
68 | 42: empty: she did not like to drop the jar for fear of killing somebody, | ||
69 | 43: so managed to put it into one of the cupboards as she fell past it. | ||
70 | 44: | ||
71 | 45: 'Well!' thought Alice to herself, 'after such a fall as this, | ||
72 | 46: I shall think nothing of tumbling down stairs! How brave they'll all | ||
73 | 47: think me at home! Why, I wouldn't say anything about it, even if I | ||
74 | 48: fell off the top of the house!' (Which was very likely true.) | ||
75 | 49: | ||
76 | 50: Down, down, down. Would the fall never come to an end! 'I wonder how | ||
77 | 51: many miles I've fallen by this time?' she said aloud. 'I must be | ||
78 | 52: getting somewhere near the centre of the earth. Let me see: that would be | ||
79 | 53: four thousand miles down, I think--' (for, you see, Alice had learnt | ||
80 | 54: several things of this sort in her lessons in the schoolroom, and though | ||
81 | 55: this was not a very good opportunity for showing off her knowledge, | ||
82 | 56: as there was no one to listen to her, still it was good practice to | ||
83 | 57: say it over) '--yes, that's about the right distance--but then I | ||
84 | 58: wonder what Latitude or Longitude I've got to?' (Alice had no idea | ||
85 | 59: what Latitude was, or Longitude either, but thought they were nice grand | ||
86 | 60: words to say.) | ||
87 | 61: | ||
88 | 62: Presently she began again. 'I wonder if I shall fall right through | ||
89 | 63: the earth! How funny it'll seem to come out among the people that | ||
90 | 64: walk with their heads downward! The Antipathies, I think--' (she was | ||
91 | 65: rather glad there was no one listening, this time, as it didn't sound | ||
92 | 66: at all the right word) '--but I shall have to ask them what the name | ||
93 | 67: of the country is, you know. Please, Ma'am, is this New Zealand or | ||
94 | 68: Australia?' (and she tried to curtsey as she spoke--fancy curtseying | ||
95 | 69: as you're falling through the air! Do you think you could manage | ||
96 | 70: it?) 'And what an ignorant little girl she'll think me for asking! No, | ||
97 | 71: it'll never do to ask: perhaps I shall see it written up somewhere.' | ||
98 | stdout listing ends | ||
99 | ]) | ||
100 | AT_CLEANUP | ||