From f3b4def577c4eee22f83b72d1310aa1d9155908d Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Fri, 8 Jan 2016 15:14:01 +0000 Subject: 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. --- tests/misc/comm.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') 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"} ], -- cgit v1.2.3-70-g09d2