i18n: mark checkout plural warning for translation
[gitweb.git] / t / t0081-line-buffer.sh
index a8eeb206457be723ac35c35e557f45967650dc89..5067d1e15b566721c1a3ae79052cbcb023a03656 100755 (executable)
@@ -47,13 +47,13 @@ long_read_test () {
        rm -f input &&
        mkfifo input &&
        {
-               {
+               (
                        generate_tens_of_lines $tens_of_lines "$line" &&
-                       sleep 100
-               } >input &
+                       exec sleep 100
+               ) >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,18 +105,18 @@ 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 &&
        {
-               {
+               (
                        printf "%s" a &&
                        printf "%s" b &&
-                       sleep 100
-               } >input &
+                       exec sleep 100
+               ) >input &
        } &&
        test-line-buffer input <<-\EOF >actual &&
-       read 1
+       binary 1
        copy 1
        EOF
        kill $! &&
@@ -131,12 +131,12 @@ test_expect_success PIPE,EXPENSIVE 'longer read (around 65536 bytes)' '
        long_read_test 65536
 '
 
-test_expect_success 'buffer_read_string copes with null byte' '
-       >expect &&
-       q_to_nul <<-\EOF | test-line-buffer >actual &&
-       read 2
-       Q
-       EOF
+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
 '
 
@@ -161,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