* tests/tty/tty-eof.pl: Remove command specific logic,
and adjust commands to support general input.
Also add cut -b, as cut_bytes has its own read loop.
---
tests/tty/tty-eof.pl | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/tty/tty-eof.pl b/tests/tty/tty-eof.pl
index 7cac3b5e2..4820dafe8 100755
--- a/tests/tty/tty-eof.pl
+++ b/tests/tty/tty-eof.pl
@@ -36,7 +36,6 @@ $@
base64
cat
cksum
- dd
expand
fmt
fold
@@ -63,8 +62,13 @@ $@
uniq
wc
);
- my @commands = (@stdin_reading_commands, 'basenc --z85', 'cut -f2',
- 'numfmt --invalid=ignore');
+ my @commands = (@stdin_reading_commands,
+ 'basenc --z85',
+ 'cut -d " " -f2',
+ 'cut -b1-3',
+ 'dd status=none',
+ 'numfmt --invalid=ignore'
+ );
my $stderr = 'tty-eof.err';
foreach my $with_input (1, 0)
{
@@ -82,7 +86,7 @@ $@
my $found;
if ($with_input)
{
- my $input = $cmd =~ /^cut/ ? "a\tb\n" : "a b\n";
+ my $input = "a b\n";
my $echo = quotemeta $input;
$echo =~ s/\n$//;
@@ -112,10 +116,6 @@ $@
$fail=1;
$exp->hard_close();
- # dd normally writes to stderr. If it exits successfully, we're
done.
- $cmd eq 'dd' && $s == 0
- and next;
-
if (-s $stderr)
{
warn "$ME: $cmd wrote to stderr ($mode):\n";
--
2.53.0