3 test_description
='basic tests for the SHA1 array implementation'
11 echo "$prefix$ZERO_OID" |
sed -e "s/00/$1/g"
16 test_expect_success
'ordered enumeration' '
17 echoid "" 44 55 88 aa >expect &&
19 echoid append 88 44 aa 55 &&
21 } | test-tool sha1-array >actual &&
22 test_cmp expect actual
25 test_expect_success
'ordered enumeration with duplicate suppression' '
26 echoid "" 44 55 88 aa >expect &&
28 echoid append 88 44 aa 55 &&
29 echoid append 88 44 aa 55 &&
31 } | test-tool sha1-array >actual &&
32 test_cmp expect actual
35 test_expect_success
'lookup' '
37 echoid append 88 44 aa 55 &&
39 } | test-tool sha1-array >actual &&
44 test_expect_success
'lookup non-existing entry' '
46 echoid append 88 44 aa 55 &&
48 } | test-tool sha1-array >actual &&
53 test_expect_success
'lookup with duplicates' '
55 echoid append 88 44 aa 55 &&
56 echoid append 88 44 aa 55 &&
58 } | test-tool sha1-array >actual &&
64 test_expect_success
'lookup non-existing entry with duplicates' '
66 echoid append 88 44 aa 55 &&
67 echoid append 88 44 aa 55 &&
69 } | test-tool sha1-array >actual &&
74 test_expect_success
'lookup with almost duplicate values' '
76 root=$(echoid "" 55) &&
84 } | test-tool sha1-array >actual &&
89 test_expect_success
'lookup with single duplicate value' '
91 echoid append 55 55 &&
93 } | test-tool sha1-array >actual &&