diff options
| author | Jim Meyering <meyering@redhat.com> | 2009-08-22 18:56:06 +0200 |
|---|---|---|
| committer | Jim Meyering <meyering@redhat.com> | 2009-08-25 09:21:00 +0200 |
| commit | 5e778f7c8d1ecf3d8f11385db013af2ba026e2a5 (patch) | |
| tree | e460d471f37f0dce1ba06f60f88114d1a65326c4 /tests/misc/uniq | |
| parent | cp: ignore obscure failure to preserve symlink time stamps, (diff) | |
| download | coreutils-5e778f7c8d1ecf3d8f11385db013af2ba026e2a5.tar.gz coreutils-5e778f7c8d1ecf3d8f11385db013af2ba026e2a5.zip | |
global: convert indentation-TABs to spaces
Transformed via this shell code:
t=$'\t'
git ls-files \
| grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \
| grep -vE 'tests/pr/|help2man' \
| xargs grep -lE "^ *$t" \
| xargs perl -MText::Tabs -ni -le \
'$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'tests/misc/uniq')
| -rwxr-xr-x | tests/misc/uniq | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/misc/uniq b/tests/misc/uniq index 3153581fe..689115aa9 100755 --- a/tests/misc/uniq +++ b/tests/misc/uniq @@ -38,42 +38,42 @@ sub add_z_variants($) # skip the obsolete-syntax tests $t->[0] =~ /^obs-plus/ - and next; + and next; my @args; my @list_of_hash; foreach my $e (@$t) - { - !ref $e - and push (@args, $e), next; - - ref $e && ref $e eq 'HASH' - or (warn "$0: $t->[0]: unexpected entry type\n"), next; - my $tmp = $e; - foreach my $k (qw(IN OUT)) - { - my $val = $e->{$k}; - # skip any test whose input or output already contains a NUL byte - if (defined $val) - { - $val =~ /\0/ - and next TEST; - - # Convert each NL in input or output to \0. - $val =~ s/\n/\0/g; - $tmp = {$k => $val}; - last; - } - } - push @list_of_hash, $tmp; - } + { + !ref $e + and push (@args, $e), next; + + ref $e && ref $e eq 'HASH' + or (warn "$0: $t->[0]: unexpected entry type\n"), next; + my $tmp = $e; + foreach my $k (qw(IN OUT)) + { + my $val = $e->{$k}; + # skip any test whose input or output already contains a NUL byte + if (defined $val) + { + $val =~ /\0/ + and next TEST; + + # Convert each NL in input or output to \0. + $val =~ s/\n/\0/g; + $tmp = {$k => $val}; + last; + } + } + push @list_of_hash, $tmp; + } shift @args; # discard test name # skip any test that uses the -z option grep /z/, @args - and next; + and next; push @new, ["$t->[0]-z", '-z', @args, @list_of_hash]; } |
