summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-08-14 05:09:15 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-08-14 05:09:15 (GMT)
commit6375f82b61755f9c85f2d717126027522643c770 (patch) (unidiff)
treebbaf785882c073c1446752115112b26033a54880
parent4eccf7961cea116a45704610e12c3f3a3675a04b (diff)
downloadposixruncapture-6375f82b61755f9c85f2d717126027522643c770.tar.gz
posixruncapture-6375f82b61755f9c85f2d717126027522643c770.tar.bz2
Upgrade runcap
* runcap: Upgrade. * t/09linemon.t: New test.
Diffstat (more/less context) (ignore whitespace changes)
m---------runcap0
-rw-r--r--t/09linemon.t35
2 files changed, 35 insertions, 0 deletions
diff --git a/runcap b/runcap
Subproject 048800a78f64808116bb9b943837062a67f586a Subproject 1309ae35b1ff7ed26a3ccc2fcdc6bd13bb494ce
diff --git a/t/09linemon.t b/t/09linemon.t
new file mode 100644
index 0000000..1f1666a
--- a/dev/null
+++ b/t/09linemon.t
@@ -0,0 +1,35 @@
1# -*- perl -*-
2
3use lib 't', 'lib';
4
5use strict;
6use warnings;
7use TestCapture;
8use Test::More tests => 3;
9
10our($catbin, $input, $content);
11
12my @lines;
13
14TestCapture({ argv => [$catbin, $input],
15 stdout => sub { push @lines, shift } });
16
17is($content, join('', @lines));
18
19@lines = ();
20
21TestCapture({ argv => [$catbin, '-l', 31, $input],
22 stdout => sub { push @lines, shift } });
23
24is_deeply(\@lines, ['CHAPTER I. Down the Rabbit-Hole']);
25
26@lines = ();
27
28TestCapture({ argv => [$catbin, '-l', 102, $input],
29 stdout => sub { push @lines, shift } });
30
31is_deeply(\@lines, [ "CHAPTER I. Down the Rabbit-Hole\n",
32 "\n",
33 'Alice was beginning to get very tired of sitting by her sister on the' ]);
34
35

Return to:

Send suggestions and report system problems to the System administrator.