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