coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: add tests for basename's --zero option


From: Bernhard Voelker
Subject: Re: [PATCH] tests: add tests for basename's --zero option
Date: Thu, 20 Dec 2012 16:46:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/20/2012 04:01 PM, Pádraig Brady wrote:
> On 12/20/2012 02:49 PM, Bernhard Voelker wrote:
>>   # Append a newline to end of each expected 'OUT' string.
>> +# Skip -z tests, i.e. those whose name matches /^z/.
>>   my $t;
>>   foreach $t (@Tests)
>>     {
>> @@ -72,7 +80,8 @@ foreach $t (@Tests)
>>       foreach $e (@$t)
>>         {
>>           $e->{OUT} = "$e->{OUT}\n"
>> -          if ref $e eq 'HASH' and exists $e->{OUT};
>> +          if ref $e eq 'HASH' and exists $e->{OUT}
>> +          and not $t->[0] =~ /^z/;
>>         }
>>     }
>>
> 
> Or alternatively skip for OUT with a trailing \0
> Either way, +1

Thanks for the review. Pushed with your suggestion:
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=0568f72

Diff to previous patch (I also fixed the indentation of the
new and-clause):

 # Append a newline to end of each expected 'OUT' string.
-+# Skip -z tests, i.e. those whose name matches /^z/.
++# Skip -z tests, i.e. those whose 'OUT' string has a trailing '\0'.
  my $t;
  foreach $t (@Tests)
    {
@@ -39,7 +39,7 @@
          $e->{OUT} = "$e->{OUT}\n"
 -          if ref $e eq 'HASH' and exists $e->{OUT};
 +          if ref $e eq 'HASH' and exists $e->{OUT}
-+          and not $t->[0] =~ /^z/;
++            and not $e->{OUT} =~ /\0$/;

Have a nice day,
Berny



reply via email to

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