diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2011-03-24 23:09:19 -0500 |
---|---|---|
committer | Jonathan Nieder <jrnieder@gmail.com> | 2011-03-26 00:17:35 -0500 |
commit | 7e2fe3a9fc816391b322ad9b3f2adf9342631db6 (patch) | |
tree | dfff25606bdefe49287d379f2e3bc538af1013d3 /t/t0081-line-buffer.sh | |
parent | e7d04ee147dcbe6af1fa1d2147466696e2be31bc (diff) | |
download | git-7e2fe3a9fc816391b322ad9b3f2adf9342631db6.tar.gz |
vcs-svn: remove buffer_read_string
All previous users of buffer_read_string have already been converted
to use the more intuitive buffer_read_binary, so remove the old API to
avoid some confusion.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 't/t0081-line-buffer.sh')
-rwxr-xr-x | t/t0081-line-buffer.sh | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh index 550fad0823..1dbe1c9b08 100755 --- a/t/t0081-line-buffer.sh +++ b/t/t0081-line-buffer.sh @@ -53,7 +53,7 @@ long_read_test () { } >input & } && test-line-buffer input <<-EOF >output && - read $readsize + binary $readsize copy $copysize EOF kill $! && @@ -71,23 +71,23 @@ test_expect_success 'setup: have pipes?' ' ' test_expect_success 'hello world' ' - echo HELLO >expect && + echo ">HELLO" >expect && test-line-buffer <<-\EOF >actual && - read 6 + binary 6 HELLO EOF test_cmp expect actual ' test_expect_success PIPE '0-length read, no input available' ' - >expect && + printf ">" >expect && rm -f input && mkfifo input && { sleep 100 >input & } && test-line-buffer input <<-\EOF >actual && - read 0 + binary 0 copy 0 EOF kill $! && @@ -95,9 +95,9 @@ test_expect_success PIPE '0-length read, no input available' ' ' test_expect_success '0-length read, send along greeting' ' - echo HELLO >expect && + echo ">HELLO" >expect && test-line-buffer <<-\EOF >actual && - read 0 + binary 0 copy 6 HELLO EOF @@ -105,7 +105,7 @@ test_expect_success '0-length read, send along greeting' ' ' test_expect_success PIPE '1-byte read, no input available' ' - printf "%s" ab >expect && + printf ">%s" ab >expect && rm -f input && mkfifo input && { @@ -116,7 +116,7 @@ test_expect_success PIPE '1-byte read, no input available' ' } >input & } && test-line-buffer input <<-\EOF >actual && - read 1 + binary 1 copy 1 EOF kill $! && @@ -140,15 +140,6 @@ test_expect_success 'read from file descriptor' ' test_cmp expect actual ' -test_expect_success 'buffer_read_string copes with null byte' ' - >expect && - q_to_nul <<-\EOF | test-line-buffer >actual && - read 2 - Q - EOF - test_cmp expect actual -' - test_expect_success 'skip, copy null byte' ' echo Q | q_to_nul >expect && q_to_nul <<-\EOF | test-line-buffer >actual && @@ -170,18 +161,18 @@ test_expect_success 'read null byte' ' ' test_expect_success 'long reads are truncated' ' - echo foo >expect && + echo ">foo" >expect && test-line-buffer <<-\EOF >actual && - read 5 + binary 5 foo EOF test_cmp expect actual ' test_expect_success 'long copies are truncated' ' - printf "%s\n" "" foo >expect && + printf "%s\n" ">" foo >expect && test-line-buffer <<-\EOF >actual && - read 1 + binary 1 copy 5 foo |