diff options
author | Jim Meyering <jim@meyering.net> | 2003-09-07 17:21:48 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-09-07 17:21:48 +0000 |
commit | 1f36aa51213dc59ae1ab72ba74b6f1f4529f0842 (patch) | |
tree | a32a51ee8a42e1e823181eb93b64fd6bdffedc6f /tests/misc | |
parent | edd0e9f89b1cb64672fd9f49cd15fa560add92a1 (diff) | |
download | coreutils-1f36aa51213dc59ae1ab72ba74b6f1f4529f0842.tar.xz |
Write ^D as \cD.
Complete the change of 2003-08-02.
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/tty-eof | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof index c0c7b4b8d..da2e50d1f 100755 --- a/tests/misc/tty-eof +++ b/tests/misc/tty-eof @@ -39,12 +39,13 @@ $@ and (warn "$ME: this script requires Perl's Expect package >=1.11\n"), # No input for cut -f2. $cmd =~ /^cut/ or $exp->send("a b\n"); - $exp->send(''); # FIXME: it'd be better not to hard-code ^D here + $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', "^.+\$"); # $found and warn "F: $found: " . $exp->exp_match () . "\n"; $exp->expect(1, 'eof'); - defined $found + # 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; defined defined $exp->exitstatus |