3 test_description
="Test the svn importer's input handling routines.
7 test_expect_success
'read greeting' '
9 test-line-buffer <<-\EOF >actual &&
13 test_cmp expect actual
16 test_expect_success
'0-length read, send along greeting' '
18 test-line-buffer <<-\EOF >actual &&
23 test_cmp expect actual
26 test_expect_success
'buffer_read_string copes with null byte' '
28 q_to_nul <<-\EOF | test-line-buffer >actual &&
32 test_cmp expect actual
35 test_expect_success
'skip, copy null byte' '
36 echo Q | q_to_nul >expect &&
37 q_to_nul <<-\EOF | test-line-buffer >actual &&
43 test_cmp expect actual
46 test_expect_success
'long reads are truncated' '
48 test-line-buffer <<-\EOF >actual &&
52 test_cmp expect actual
55 test_expect_success
'long copies are truncated' '
56 printf "%s\n" "" foo >expect &&
57 test-line-buffer <<-\EOF >actual &&
63 test_cmp expect actual