summaryrefslogtreecommitdiff
path: root/tests/misc/tty-eof
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-08-02 19:41:28 +0000
committerJim Meyering <jim@meyering.net>2003-08-02 19:41:28 +0000
commit40944ce6ceb576174d80e65d41b1e0bd592535cf (patch)
tree9d45f3bba6ebd9ce32b8d994b989b8ad0b7d034d /tests/misc/tty-eof
parentca78a418b2809b2d0096be40fd8c4ad5723df5ec (diff)
downloadcoreutils-40944ce6ceb576174d80e65d41b1e0bd592535cf.tar.xz
Add a test for the above fix.
`cut -f2' would read after EOF.
Diffstat (limited to 'tests/misc/tty-eof')
-rwxr-xr-xtests/misc/tty-eof6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof
index aca723526..c0c7b4b8d 100755
--- a/tests/misc/tty-eof
+++ b/tests/misc/tty-eof
@@ -30,13 +30,15 @@ $@ and (warn "$ME: this script requires Perl's Expect package >=1.11\n"),
my $fail = 0;
foreach my $cmd (qw( cat cksum dd expand fmt fold head md5sum nl od
paste pr ptx sha1sum sort sum tac tee tail tsort
- unexpand uniq wc ))
+ unexpand uniq wc ), 'cut -f2')
{
my $exp = new Expect;
$exp->log_user(0);
$exp->spawn($cmd)
or (warn "$ME: cannot run `$cmd': $!\n"), $fail=1, next;
- $exp->send("a b\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->expect (0, '-re', "^a b\\r?\$");
my $found = $exp->expect (1, '-re', "^.+\$");