From 8ee5d881b1640fd09c8f164075d546a6265d0599 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 9 Jan 2003 20:30:40 +0000 Subject: (out-delim1, ..., out-delim5): Test new functionality. --- tests/cut/Test.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/cut/Test.pm') diff --git a/tests/cut/Test.pm b/tests/cut/Test.pm index c8fa22b4b..3f5e470df 100755 --- a/tests/cut/Test.pm +++ b/tests/cut/Test.pm @@ -72,6 +72,17 @@ my @tv = ( # Prior to 1.22i, you couldn't use a delimiter that would sign-extend. ['8bit-delim', "'-d\255' -f2,3 --out=_", "a\255b\255c\n", "b_c\n", 0], +# New functionality: +['out-delim1', '-c1-3,5- --output-d=:', "abcdefg\n", "abc:efg\n", 0], +# A totally overlapped field shouldn't change anything: +['out-delim2', '-c1-3,2,5- --output-d=:', "abcdefg\n", "abc:efg\n", 0], +# Partial overlap: index `2' is not at the start of a range. +['out-delim3', '-c1-3,2-4,6 --output-d=:', "abcdefg\n", "abcd:f\n", 0], +# Ensure that the following two commands produce the same output. +# Before an off-by-one fix, the output from the former would not contain a `:'. +['out-delim4', '-c4-,2-3 --output-d=:', "abcdefg\n", "bc:defg\n", 0], +['out-delim5', '-c2-3,4- --output-d=:', "abcdefg\n", "bc:defg\n", 0], + ); # Don't use a pipe for failing tests. Otherwise, sometimes they -- cgit v1.2.3-70-g09d2