Merge branch 'jk/test-copy-bytes-fix'
A test fix. * jk/test-copy-bytes-fix: t: handle EOF in test_copy_bytes()
This commit is contained in:
commit
d5bfa469f4
@ -999,6 +999,7 @@ test_copy_bytes () {
|
|||||||
my $s;
|
my $s;
|
||||||
my $nread = sysread(STDIN, $s, $len);
|
my $nread = sysread(STDIN, $s, $len);
|
||||||
die "cannot read: $!" unless defined($nread);
|
die "cannot read: $!" unless defined($nread);
|
||||||
|
last unless $nread;
|
||||||
print $s;
|
print $s;
|
||||||
$len -= $nread;
|
$len -= $nread;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user