summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2016-01-08 15:14:01 +0000
committerPádraig Brady <P@draigBrady.com>2016-01-13 10:59:56 +0000
commitf3b4def577c4eee22f83b72d1310aa1d9155908d (patch)
tree8347150d38fc5230f76c5a2a074454c9e2ffb2b3 /tests
parent826c98b02486dd9dbbab3d2381d5f778af42dd7a (diff)
downloadcoreutils-f3b4def577c4eee22f83b72d1310aa1d9155908d.tar.xz
comm: add the -z,--zero-terminated option
* doc/coreutils.texi (comm invocation): Reference option description. * src/comm.c (main): Use readlinebuffer_delim() to support a parameterized delimiter. * tests/misc/comm.pl: Add test cases. * NEWS: Mention the new feature.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/comm.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/misc/comm.pl b/tests/misc/comm.pl
index 52d14ba5a..3232d6339 100755
--- a/tests/misc/comm.pl
+++ b/tests/misc/comm.pl
@@ -28,14 +28,17 @@ my $prog = 'comm';
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
my @inputs = ({IN=>{a=>"1\n3"}}, {IN=>{b=>"2\n3"}});
+my @zinputs = ({IN=>{za=>"1\0003"}}, {IN=>{zb=>"2\0003"}});
my @Tests =
(
# basic operation
['basic', @inputs, {OUT=>"1\n\t2\n\t\t3\n"} ],
+ ['zbasic', '-z', @zinputs, {OUT=>"1\0\t2\0\t\t3\0"} ],
# suppress lines unique to file 1
['opt-1', '-1', @inputs, {OUT=>"2\n\t3\n"} ],
+ ['zopt-1', '-z', '-1', @zinputs, {OUT=>"2\0\t3\0"} ],
# suppress lines unique to file 2
['opt-2', '-2', @inputs, {OUT=>"1\n\t3\n"} ],