aboutsummaryrefslogtreecommitdiff
path: root/t/two.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2017-08-19 20:24:59 +0300
committerSergey Poznyakoff <gray@gnu.org>2017-08-19 20:28:40 +0300
commitde5b0a9c0265b329b0c67cb02381fe7aebfd5186 (patch)
treef8462d313b327c6d3ace6445777e09de862eb8af /t/two.at
parent511f9c9765eb2a9992ea4470703ebcd96faca52b (diff)
downloadruncap-de5b0a9c0265b329b0c67cb02381fe7aebfd5186.tar.gz
runcap-de5b0a9c0265b329b0c67cb02381fe7aebfd5186.tar.bz2
Rewrite testsuite in autotest. Fix distcheck
Diffstat (limited to 't/two.at')
-rw-r--r--t/two.at50
1 files changed, 50 insertions, 0 deletions
diff --git a/t/two.at b/t/two.at
new file mode 100644
index 0000000..3be76b2
--- /dev/null
+++ b/t/two.at
@@ -0,0 +1,50 @@
1# Testsuite 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
17AT_SETUP([capture both stdout and stderr])
18AT_KEYWORDS([two])
19AT_CHECK([rt -n all -- genout -l 337 -o $INPUT -s 628 -l 734 -e $INPUT
20],
21[0],
22[res=0
23exit code: 0
24stdout: 8 lines, 337 bytes
25stderr: 11 lines, 734 bytes
26stdout 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:
35stdout listing ends
36stderr listing:
37 1: There was nothing so very remarkable in that; nor did Alice think it
38 2: so very much out of the way to hear the Rabbit say to itself, 'Oh
39 3: dear! Oh dear! I shall be late!' (when she thought it over afterwards,
40 4: it occurred to her that she ought to have wondered at this, but at the
41 5: time it all seemed quite natural); but when the Rabbit actually took a
42 6: watch out of its waistcoat-pocket, and looked at it, and then hurried on,
43 7: Alice started to her feet, for it flashed across her mind that she had
44 8: never before seen a rabbit with either a waistcoat-pocket, or a watch
45 9: to take out of it, and burning with curiosity, she ran across the field
46 10: after it, and fortunately was just in time to see it pop down a large
47 11: rabbit-hole under the hedge.
48stderr listing ends
49])
50AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.