1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018-2020 Intel Corporation
5 #ifndef TEST_COMPRESSDEV_TEST_BUFFERS_H_
6 #define TEST_COMPRESSDEV_TEST_BUFFERS_H_
9 * These test buffers are snippets obtained
10 * from the Canterbury and Calgary Corpus
14 /* Snippet of Alice's Adventures in Wonderland */
15 static const char test_buf_alice[] =
16 " Alice was beginning to get very tired of sitting by her sister\n"
17 "on the bank, and of having nothing to do: once or twice she had\n"
18 "peeped into the book her sister was reading, but it had no\n"
19 "pictures or conversations in it, `and what is the use of a book,'\n"
20 "thought Alice `without pictures or conversation?'\n\n"
21 " So she was considering in her own mind (as well as she could,\n"
22 "for the hot day made her feel very sleepy and stupid), whether\n"
23 "the pleasure of making a daisy-chain would be worth the trouble\n"
24 "of getting up and picking the daisies, when suddenly a White\n"
25 "Rabbit with pink eyes ran close by her.\n\n"
26 " There was nothing so VERY remarkable in that; nor did Alice\n"
27 "think it so VERY much out of the way to hear the Rabbit say to\n"
28 "itself, `Oh dear! Oh dear! I shall be late!' (when she thought\n"
29 "it over afterwards, it occurred to her that she ought to have\n"
30 "wondered at this, but at the time it all seemed quite natural);\n"
31 "but when the Rabbit actually TOOK A WATCH OUT OF ITS WAISTCOAT-\n"
32 "POCKET, and looked at it, and then hurried on, Alice started to\n"
33 "her feet, for it flashed across her mind that she had never\n"
34 "before seen a rabbit with either a waistcoat-pocket, or a watch to\n"
35 "take out of it, and burning with curiosity, she ran across the\n"
36 "field after it, and fortunately was just in time to see it pop\n"
37 "down a large rabbit-hole under the hedge.\n\n"
38 " In another moment down went Alice after it, never once\n"
39 "considering how in the world she was to get out again.\n\n"
40 " The rabbit-hole went straight on like a tunnel for some way,\n"
41 "and then dipped suddenly down, so suddenly that Alice had not a\n"
42 "moment to think about stopping herself before she found herself\n"
43 "falling down a very deep well.\n\n"
44 " Either the well was very deep, or she fell very slowly, for she\n"
45 "had plenty of time as she went down to look about her and to\n"
46 "wonder what was going to happen next. First, she tried to look\n"
47 "down and make out what she was coming to, but it was too dark to\n"
48 "see anything; then she looked at the sides of the well, and\n"
49 "noticed that they were filled with cupboards and book-shelves;\n"
50 "here and there she saw maps and pictures hung upon pegs. She\n"
51 "took down a jar from one of the shelves as she passed; it was\n"
52 "labelled `ORANGE MARMALADE', but to her great disappointment it\n"
53 "was empty: she did not like to drop the jar for fear of killing\n"
54 "somebody, so managed to put it into one of the cupboards as she\n"
56 " `Well!' thought Alice to herself, `after such a fall as this, I\n"
57 "shall think nothing of tumbling down stairs! How brave they'll\n"
58 "all think me at home! Why, I wouldn't say anything about it,\n"
59 "even if I fell off the top of the house!' (Which was very likely\n"
61 " Down, down, down. Would the fall NEVER come to an end! `I\n"
62 "wonder how many miles I've fallen by this time?' she said aloud.\n"
63 "`I must be getting somewhere near the centre of the earth. Let\n"
64 "me see: that would be four thousand miles down, I think--' (for,\n"
65 "you see, Alice had learnt several things of this sort in her\n"
66 "lessons in the schoolroom, and though this was not a VERY good\n"
67 "opportunity for showing off her knowledge, as there was no one to\n"
68 "listen to her, still it was good practice to say it over) `--yes,\n"
69 "that's about the right distance--but then I wonder what Latitude\n"
70 "or Longitude I've got to?' (Alice had no idea what Latitude was,\n"
71 "or Longitude either, but thought they were nice grand words to\n"
73 " Presently she began again. `I wonder if I shall fall right\n"
74 "THROUGH the earth! How funny it'll seem to come out among the\n"
75 "people that walk with their heads downward! The Antipathies, I\n"
76 "think--' (she was rather glad there WAS no one listening, this\n"
77 "time, as it didn't sound at all the right word) `--but I shall\n"
78 "have to ask them what the name of the country is, you know.\n"
79 "Please, Ma'am, is this New Zealand or Australia?' (and she tried\n"
80 "to curtsey as she spoke--fancy CURTSEYING as you're falling\n"
81 "through the air! Do you think you could manage it?) `And what\n"
82 "an ignorant little girl she'll think me for asking! No, it'll\n"
83 "never do to ask: perhaps I shall see it written up somewhere.'\n"
84 " Down, down, down. There was nothing else to do, so Alice soon\n"
85 "began talking again. `Dinah'll miss me very much to-night, I\n"
86 "should think!' (Dinah was the cat.) `I hope they'll remember\n"
87 "her saucer of milk at tea-time. Dinah my dear! I wish you were\n"
88 "down here with me! There are no mice in the air, I'm afraid, but\n"
89 "you might catch a bat, and that's very like a mouse, you know.\n"
90 "But do cats eat bats, I wonder?' And here Alice began to get\n"
91 "rather sleepy, and went on saying to herself, in a dreamy sort of\n"
92 "way, `Do cats eat bats? Do cats eat bats?' and sometimes, `Do\n"
93 "bats eat cats?' for, you see, as she couldn't answer either\n"
94 "question, it didn't much matter which way she put it. She felt\n"
95 "that she was dozing off, and had just begun to dream that she\n"
96 "was walking hand in hand with Dinah, and saying to her very\n"
97 "earnestly, `Now, Dinah, tell me the truth: did you ever eat a\n"
98 "bat?' when suddenly, thump! thump! down she came upon a heap of\n"
99 "sticks and dry leaves, and the fall was over.\n\n";
101 /* Snippet of Shakespeare play */
102 static const char test_buf_shakespeare[] =
103 "CHARLES wrestler to Frederick.\n"
108 "JAQUES (JAQUES DE BOYS:) | sons of Sir Rowland de Boys.\n"
114 " | servants to Oliver.\n"
118 "TOUCHSTONE a clown.\n"
120 "SIR OLIVER MARTEXT a vicar.\n"
128 "WILLIAM a country fellow in love with Audrey.\n"
130 " A person representing HYMEN. (HYMEN:)\n"
132 "ROSALIND daughter to the banished duke.\n"
134 "CELIA daughter to Frederick.\n"
136 "PHEBE a shepherdess.\n"
138 "AUDREY a country wench.\n"
140 " Lords, pages, and attendants, &c.\n"
149 "SCENE Oliver's house; Duke Frederick's court; and the\n"
150 " Forest of Arden.\n"
162 "SCENE I Orchard of Oliver's house.\n"
165 " [Enter ORLANDO and ADAM]\n"
167 "ORLANDO As I remember, Adam, it was upon this fashion\n"
168 " bequeathed me by will but poor a thousand crowns,\n"
169 " and, as thou sayest, charged my brother, on his\n"
170 " blessing, to breed me well: and there begins my\n"
171 " sadness. My brother Jaques he keeps at school, and\n"
172 " report speaks goldenly of his profit: for my part,\n"
173 " he keeps me rustically at home, or, to speak more\n"
174 " properly, stays me here at home unkept; for call you\n"
175 " that keeping for a gentleman of my birth, that\n"
176 " differs not from the stalling of an ox? His horses\n"
177 " are bred better; for, besides that they are fair\n"
178 " with their feeding, they are taught their manage,\n"
179 " and to that end riders dearly hired: but I, his\n"
180 " brother, gain nothing under him but growth; for the\n"
181 " which his animals on his dunghills are as much\n"
182 " bound to him as I. Besides this nothing that he so\n"
183 " plentifully gives me, the something that nature gave\n"
184 " me his countenance seems to take from me: he lets\n"
185 " me feed with his hinds, bars me the place of a\n"
186 " brother, and, as much as in him lies, mines my\n"
187 " gentility with my education. This is it, Adam, that\n"
188 " grieves me; and the spirit of my father, which I\n"
189 " think is within me, begins to mutiny against this\n"
190 " servitude: I will no longer endure it, though yet I\n"
191 " know no wise remedy how to avoid it.\n"
193 "ADAM Yonder comes my main, your brother.\n"
195 "ORLANDO Go apart, Adam, and thou shalt hear how he will\n";
197 /* Snippet of Alice's Adventures in Wonderland */
198 static const char test_buf_alice2[] =
199 "`Curiouser and curiouser!' cried Alice (she was so much\n"
200 "surprised, that for the moment she quite forgot how to speak good\n"
201 "English); `now I'm opening out like the largest telescope that\n"
202 "ever was! Good-bye, feet!' (for when she looked down at her\n"
203 "feet, they seemed to be almost out of sight, they were getting so\n"
204 "far off). `Oh, my poor little feet, I wonder who will put on\n"
205 "your shoes and stockings for you now, dears? I'm sure _I_ shan't\n"
206 "be able! I shall be a great deal too far off to trouble myself\n"
207 "about you: you must manage the best way you can; --but I must be\n"
208 "kind to them,' thought Alice, `or perhaps they won't walk the\n"
209 "way I want to go! Let me see: I'll give them a new pair of\n"
210 "boots every Christmas.'\n"
212 " And she went on planning to herself how she would manage it.\n"
213 "`They must go by the carrier,' she thought; `and how funny it'll\n"
214 "seem, sending presents to one's own feet! And how odd the\n"
215 "directions will look!\n"
217 " ALICE'S RIGHT FOOT, ESQ.\n"
219 " NEAR THE FENDER,\n"
220 " (WITH ALICE'S LOVE).\n"
222 "Oh dear, what nonsense I'm talking!'\n"
224 " Just then her head struck against the roof of the hall: in\n"
225 "fact she was now more than nine feet high, and she at once took\n"
226 "up the little golden key and hurried off to the garden door.\n"
228 " Poor Alice! It was as much as she could do, lying down on one\n"
229 "side, to look through into the garden with one eye; but to get\n"
230 "through was more hopeless than ever: she sat down and began to\n"
233 " `You ought to be ashamed of yourself,' said Alice, `a great\n"
234 "girl like you,' (she might well say this), `to go on crying in\n"
235 "this way! Stop this moment, I tell you!' But she went on all\n"
236 "the same, shedding gallons of tears, until there was a large pool\n"
237 "all round her, about four inches deep and reaching half down the\n"
240 " After a time she heard a little pattering of feet in the\n"
241 "distance, and she hastily dried her eyes to see what was coming.\n"
242 "It was the White Rabbit returning, splendidly dressed, with a\n"
243 "pair of white kid gloves in one hand and a large fan in the\n"
244 "other: he came trotting along in a great hurry, muttering to\n"
245 "himself as he came, `Oh! the Duchess, the Duchess! Oh! won't she\n"
246 "be savage if I've kept her waiting!' Alice felt so desperate\n"
247 "that she was ready to ask help of any one; so, when the Rabbit\n"
248 "came near her, she began, in a low, timid voice, `If you please,\n"
249 "sir--' The Rabbit started violently, dropped the white kid\n"
250 "gloves and the fan, and skurried away into the darkness as hard\n"
253 " Alice took up the fan and gloves, and, as the hall was very\n"
254 "hot, she kept fanning herself all the time she went on talking:\n"
255 "`Dear, dear! How queer everything is to-day! And yesterday\n"
256 "things went on just as usual. I wonder if I've been changed in\n"
257 "the night? Let me think: was I the same when I got up this\n"
258 "morning? I almost think I can remember feeling a little\n"
259 "different. But if I'm not the same, the next question is, Who in\n"
260 "the world am I? Ah, THAT'S the great puzzle!' And she began\n"
261 "thinking over all the children she knew that were of the same age\n"
262 "as herself, to see if she could have been changed for any of\n"
265 " `I'm sure I'm not Ada,' she said, `for her hair goes in such\n"
266 "long ringlets, and mine doesn't go in ringlets at all; and I'm\n"
267 "sure I can't be Mabel, for I know all sorts of things, and she,\n"
268 "oh! she knows such a very little! Besides, SHE'S she, and I'm I,\n"
269 "and--oh dear, how puzzling it all is! I'll try if I know all the\n"
270 "things I used to know. Let me see: four times five is twelve,\n"
271 "and four times six is thirteen, and four times seven is--oh dear!\n"
272 "I shall never get to twenty at that rate! However, the\n"
273 "Multiplication Table doesn't signify: let's try Geography.\n"
274 "London is the capital of Paris, and Paris is the capital of Rome,\n"
275 "and Rome--no, THAT'S all wrong, I'm certain! I must have been\n"
276 "changed for Mabel! I'll try and say ''How doth the little--''\n"
277 "and she crossed her hands on her lap as if she were saying lessons,\n"
278 "and began to repeat it, but her voice sounded hoarse and\n"
279 "strange, and the words did not come the same as they used to do:--\n"
281 " `How doth the little crocodile\n"
282 " Improve his shining tail,\n"
283 " And pour the waters of the Nile\n"
284 " On every golden scale!\n"
286 " `How cheerfully he seems to grin,\n"
287 " How neatly spread his claws,\n"
288 " And welcome little fishes in\n"
289 " With gently smiling jaws!'\n";
291 static const char * const compress_test_bufs[] = {
293 test_buf_shakespeare,
297 #endif /* TEST_COMPRESSDEV_TEST_BUFFERS_H_ */