3 test_description='basic tests for the SHA1 array implementation'
11 echo "$prefix$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1"
16 test_expect_success 'ordered enumeration' '
17 echo20 "" 44 55 88 aa >expect &&
19 echo20 append 88 44 aa 55 &&
21 } | test-sha1-array >actual &&
22 test_cmp expect actual
25 test_expect_success 'ordered enumeration with duplicate suppression' '
26 echo20 "" 44 55 88 aa >expect &&
28 echo20 append 88 44 aa 55 &&
29 echo20 append 88 44 aa 55 &&
31 } | test-sha1-array >actual &&
32 test_cmp expect actual
35 test_expect_success 'lookup' '
37 echo20 append 88 44 aa 55 &&
39 } | test-sha1-array >actual &&
44 test_expect_success 'lookup non-existing entry' '
46 echo20 append 88 44 aa 55 &&
48 } | test-sha1-array >actual &&
53 test_expect_success 'lookup with duplicates' '
55 echo20 append 88 44 aa 55 &&
56 echo20 append 88 44 aa 55 &&
58 } | test-sha1-array >actual &&
64 test_expect_success 'lookup non-existing entry with duplicates' '
66 echo20 append 88 44 aa 55 &&
67 echo20 append 88 44 aa 55 &&
69 } | test-sha1-array >actual &&
74 test_expect_success 'lookup with almost duplicate values' '
76 echo "append 5555555555555555555555555555555555555555" &&
77 echo "append 555555555555555555555555555555555555555f" &&
79 } | test-sha1-array >actual &&
84 test_expect_success 'lookup with single duplicate value' '
86 echo20 append 55 55 &&
88 } | test-sha1-array >actual &&