diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-08-14 08:09:15 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-08-14 08:09:15 +0300 |
commit | 6375f82b61755f9c85f2d717126027522643c770 (patch) | |
tree | bbaf785882c073c1446752115112b26033a54880 | |
parent | 4eccf7961cea116a45704610e12c3f3a3675a04b (diff) | |
download | posixruncapture-6375f82b61755f9c85f2d717126027522643c770.tar.gz posixruncapture-6375f82b61755f9c85f2d717126027522643c770.tar.bz2 |
Upgrade runcap
* runcap: Upgrade.
* t/09linemon.t: New test.
m--------- | runcap | 0 | ||||
-rw-r--r-- | t/09linemon.t | 35 |
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 --- /dev/null +++ b/t/09linemon.t @@ -0,0 +1,35 @@ +# -*- perl -*- + +use lib 't', 'lib'; + +use strict; +use warnings; +use TestCapture; +use Test::More tests => 3; + +our($catbin, $input, $content); + +my @lines; + +TestCapture({ argv => [$catbin, $input], + stdout => sub { push @lines, shift } }); + +is($content, join('', @lines)); + +@lines = (); + +TestCapture({ argv => [$catbin, '-l', 31, $input], + stdout => sub { push @lines, shift } }); + +is_deeply(\@lines, ['CHAPTER I. Down the Rabbit-Hole']); + +@lines = (); + +TestCapture({ argv => [$catbin, '-l', 102, $input], + stdout => sub { push @lines, shift } }); + +is_deeply(\@lines, [ "CHAPTER I. Down the Rabbit-Hole\n", + "\n", + 'Alice was beginning to get very tired of sitting by her sister on the' ]); + + |