coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: expand/unexpand: add tests, refactor common code


From: Pádraig Brady
Subject: Re: expand/unexpand: add tests, refactor common code
Date: Mon, 8 Aug 2016 12:32:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 07/08/16 00:34, Assaf Gordon wrote:
> Hello,
> 
> Attached updated patch, with the "extern" patch.
> Also updated the "TODO" item (8th changeset).
> 
> If there are no comments, I'll push early next week.
> BTW, is it preferable to squash them into one commit, or leave as separate 
> steps?

I'll add the following and squash to a single commit.
OK for me to push now?

diff --git a/tests/misc/unexpand.pl b/tests/misc/unexpand.pl
index 105beda..682785f 100755
--- a/tests/misc/unexpand.pl
+++ b/tests/misc/unexpand.pl
@@ -115,6 +115,14 @@ my @Tests =
      ['u7', '-a -3,9',  {IN=>"a  b     c"}, {OUT=>"a\tb\tc"}],
      # Default (without -a) is --first-only:
      ['u8', '-3',  {IN=>"   a   b"}, {OUT=>"\ta   b"}],
+
+     # Arguably this should minimize translation as is done on Solaris.
+     # I.E. not modify the input.  But since the result is equivalent,
+     # and to be consistent in output with older versions, we output
+     # a '\t' rather than a space for the second tab position.
+     ['ts1', '-t8,9', {IN=>"x\t \t y\n"},    {OUT=>"x\t\t\t y\n"}],
+     # There is no ambiguity here. This should always be the output.
+     ['ts2', '-t5,8', {IN=>"x\t \t y\n"},    {OUT=>"x\t\t y\n"}],
     );

 my $save_temps = $ENV{DEBUG};




reply via email to

[Prev in Thread] Current Thread [Next in Thread]