From cb3f87cf1ba90373fdc240d65a4d65434099d9a3 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sun, 2 Jan 2011 21:09:38 -0600 Subject: vcs-svn: allow input from file descriptor Based-on-patch-by: David Barr Signed-off-by: Jonathan Nieder --- t/t0081-line-buffer.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't/t0081-line-buffer.sh') diff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh index a8eeb2064..550fad082 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" 4actual && + test_cmp expect actual +' + test_expect_success 'buffer_read_string copes with null byte' ' >expect && q_to_nul <<-\EOF | test-line-buffer >actual && -- cgit v1.2.1