summaryrefslogtreecommitdiff
path: root/t/t0081-line-buffer.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-01-03 03:09:38 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2011-02-26 10:59:37 (GMT)
commitcb3f87cf1ba90373fdc240d65a4d65434099d9a3 (patch)
treeea9094dc1cf3c5f96df6d6fe56dee306aaddac5f /t/t0081-line-buffer.sh
parentcc193f1f0b45e4e65f246f1d5e6e8134844aa35b (diff)
downloadgit-cb3f87cf1ba90373fdc240d65a4d65434099d9a3.zip
git-cb3f87cf1ba90373fdc240d65a4d65434099d9a3.tar.gz
git-cb3f87cf1ba90373fdc240d65a4d65434099d9a3.tar.bz2
vcs-svn: allow input from file descriptor
Based-on-patch-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 't/t0081-line-buffer.sh')
-rwxr-xr-xt/t0081-line-buffer.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh
index a8eeb20..550fad0 100755
--- a/t/t0081-line-buffer.sh
+++ b/t/t0081-line-buffer.sh
@@ -131,6 +131,15 @@ test_expect_success PIPE,EXPENSIVE 'longer read (around 65536 bytes)' '
long_read_test 65536
'
+test_expect_success 'read from file descriptor' '
+ rm -f input &&
+ echo hello >expect &&
+ echo hello >input &&
+ echo copy 6 |
+ test-line-buffer "&4" 4<input >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'buffer_read_string copes with null byte' '
>expect &&
q_to_nul <<-\EOF | test-line-buffer >actual &&