summaryrefslogtreecommitdiff
path: root/tests/tac
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-05-16 20:07:40 +0000
committerJim Meyering <jim@meyering.net>1998-05-16 20:07:40 +0000
commit045ebed00c8fe0a89b3d032f4cd087af49a8d773 (patch)
tree68c3ffc8862d9abb2d49d17f08bd08bec44c2d78 /tests/tac
parent24a7456cc0e4e6b2397b7e0ea0925f2695efb435 (diff)
downloadcoreutils-045ebed00c8fe0a89b3d032f4cd087af49a8d773.tar.xz
(opt-b, opt-s, opt_sb, opt_r): New test.
(opt_br): New test -- exercises above-fixed bug.
Diffstat (limited to 'tests/tac')
-rw-r--r--tests/tac/Test.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/tac/Test.pm b/tests/tac/Test.pm
index e362acb14..e73f162da 100644
--- a/tests/tac/Test.pm
+++ b/tests/tac/Test.pm
@@ -25,6 +25,14 @@ my @tv = (
['b2-i', '', "12345\n8", "8\n12345\n", 0],
['b2-j', '', "1234\n8", "8\n1234\n", 0],
['b2-k', '', "123\n8", "8\n123\n", 0],
+
+['opt-b', '-b', "\na\nb\nc", "\nc\nb\na", 0],
+['opt-s', '-s:', "a:b:c:", "c:b:a:", 0],
+['opt-sb', '-s : -b', ":a:b:c", ":c:b:a", 0],
+['opt-r', "-r -s '\\._+'", "1._2.__3.___4._", "4._3.___2.__1._", 0],
+
+# This gave incorrect output (.___4._2.__3._1) with tac-1.22.
+['opt-br', "-b -r -s '\\._+'", "._1._2.__3.___4", ".___4.__3._2._1", 0],
);
sub test_vector
@@ -41,7 +49,8 @@ sub test_vector
# These tests lose because tac_file isn't yet up to snuff with tac_mem.
foreach $t (qw (basic-a basic-d b2-e b2-f b2-g b2-h b2-i b2-j b2-k))
{
- $Test::input_via{$t} = {REDIR => 0, PIPE => 0};
+ # $Test::input_via{$t} = {REDIR => 0, PIPE => 0};
+ $Test::input_via{$t} = {};
}
return @tv;