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/tty-eof | |
parent | 2bc0f3caaafeb240cdcfd050b7ad1fe0ad14addf (diff) | |
download | coreutils-5e778f7c8d1ecf3d8f11385db013af2ba026e2a5.tar.xz |
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/tty-eof')
-rwxr-xr-x | tests/misc/tty-eof | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof index ee33864d9..13ddbc8a3 100755 --- a/tests/misc/tty-eof +++ b/tests/misc/tty-eof @@ -67,10 +67,10 @@ $@ and (warn "$ME: this script requires Perl's Expect package >=1.11\n"), my $exp = new Expect; $exp->log_user(0); $exp->spawn("$cmd 2> $stderr") - or (warn "$ME: cannot run `$cmd': $!\n"), $fail=1, next; + or (warn "$ME: cannot run `$cmd': $!\n"), $fail=1, next; # No input for cut -f2. $cmd =~ /^cut/ - or $exp->send("a b\n"); + or $exp->send("a b\n"); $exp->send("\cD"); # This is Control-D. FIXME: what if that's not EOF? $exp->expect (0, '-re', "^a b\\r?\$"); my $found = $exp->expect (1, '-re', "^.+\$"); @@ -78,32 +78,32 @@ $@ and (warn "$ME: this script requires Perl's Expect package >=1.11\n"), $exp->expect(1, 'eof'); # Expect no output from cut, since we gave it no input. defined $found || $cmd =~ /^cut/ - or (warn "$ME: $cmd didn't produce expected output\n"), - $fail=1, next; + or (warn "$ME: $cmd didn't produce expected output\n"), + $fail=1, next; defined $exp->exitstatus - or (warn "$ME: $cmd didn't exit after ^D from standard input\n"), - $fail=1, next; + or (warn "$ME: $cmd didn't exit after ^D from standard input\n"), + $fail=1, next; my $s = $exp->exitstatus; $s == 0 - or (warn "$ME: $cmd exited with status $s (expected 0)\n"), - $fail=1; + or (warn "$ME: $cmd exited with status $s (expected 0)\n"), + $fail=1; $exp->hard_close(); # dd normally writes to stderr. If it exits successfully, we're done. $cmd eq 'dd' && $s == 0 - and next; + and next; if (-s $stderr) - { - warn "$ME: $cmd wrote to stderr:\n"; - system "cat $stderr"; - $fail = 1; - } + { + warn "$ME: $cmd wrote to stderr:\n"; + system "cat $stderr"; + $fail = 1; + } } continue { unlink $stderr - or warn "$ME: failed to remove stderr file from $cmd, $stderr: $!\n"; + or warn "$ME: failed to remove stderr file from $cmd, $stderr: $!\n"; } exit $fail |