vcs-svn: drop string_pool
[git/mingw.git] / t / t0080-vcs-svn.sh
blobce02c58e3eac50df61b61e143d94a051564b98bf
1 #!/bin/sh
3 test_description='check infrastructure for svn importer'
5 . ./test-lib.sh
6 uint32_max=4294967295
8 test_expect_success 'obj pool: store data' '
9 cat <<-\EOF >expected &&
12 EOF
14 test-obj-pool <<-\EOF >actual &&
15 alloc one 16
16 set one 13
17 test one 13
18 reset one
19 EOF
20 test_cmp expected actual
23 test_expect_success 'obj pool: NULL is offset ~0' '
24 echo "$uint32_max" >expected &&
25 echo null one | test-obj-pool >actual &&
26 test_cmp expected actual
29 test_expect_success 'obj pool: out-of-bounds access' '
30 cat <<-EOF >expected &&
33 $uint32_max
34 $uint32_max
37 $uint32_max
38 EOF
40 test-obj-pool <<-\EOF >actual &&
41 alloc one 16
42 alloc two 16
43 offset one 20
44 offset two 20
45 alloc one 5
46 offset one 20
47 free one 1
48 offset one 20
49 reset one
50 reset two
51 EOF
52 test_cmp expected actual
55 test_expect_success 'obj pool: high-water mark' '
56 cat <<-\EOF >expected &&
63 EOF
65 test-obj-pool <<-\EOF >actual &&
66 alloc one 10
67 committed one
68 alloc one 10
69 commit one
70 committed one
71 alloc one 10
72 free one 20
73 committed one
74 reset one
75 EOF
76 test_cmp expected actual
79 test_expect_success 'treap sort' '
80 cat <<-\EOF >unsorted &&
94 EOF
95 sort unsorted >expected &&
97 test-treap <unsorted >actual &&
98 test_cmp expected actual
101 test_done