summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-20 16:29:59 -0700
committerJunio C Hamano <gitster@pobox.com>2017-07-20 16:29:59 -0700
commitd5bfa469f467ff2c890272301ecab9ff94799ae3 (patch)
tree7575cdaa48e693c51c092250aa40c40c7d8536fd
parent099b74b4b267f72dfab916f28a0b17fceb293900 (diff)
parentf7f6dc340ed4eb2bddc41993e112f8f18fcc1598 (diff)
downloadgit-d5bfa469f467ff2c890272301ecab9ff94799ae3.tar.gz
Merge branch 'jk/test-copy-bytes-fix'
A test fix. * jk/test-copy-bytes-fix: t: handle EOF in test_copy_bytes()
-rw-r--r--t/test-lib-functions.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index db622c3555..50a9a1d1c4 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -999,6 +999,7 @@ test_copy_bytes () {
my $s;
my $nread = sysread(STDIN, $s, $len);
die "cannot read: $!" unless defined($nread);
+ last unless $nread;
print $s;
$len -= $nread;
}