3 test_description='basic tests for the oid 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 oid-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 &&
30 echoid append 88 44 aa 55 &&
32 } | test-tool oid-array >actual &&
33 test_cmp expect actual
36 test_expect_success 'lookup' '
38 echoid append 88 44 aa 55 &&
40 } | test-tool oid-array >actual &&
45 test_expect_success 'lookup non-existing entry' '
47 echoid append 88 44 aa 55 &&
49 } | test-tool oid-array >actual &&
54 test_expect_success 'lookup with duplicates' '
56 echoid append 88 44 aa 55 &&
57 echoid append 88 44 aa 55 &&
58 echoid append 88 44 aa 55 &&
60 } | test-tool oid-array >actual &&
66 test_expect_success 'lookup non-existing entry with duplicates' '
68 echoid append 88 44 aa 55 &&
69 echoid append 88 44 aa 55 &&
70 echoid append 88 44 aa 55 &&
72 } | test-tool oid-array >actual &&
77 test_expect_success 'lookup with almost duplicate values' '
79 root=$(echoid "" 55) &&
87 } | test-tool oid-array >actual &&
92 test_expect_success 'lookup with single duplicate value' '
94 echoid append 55 55 &&
96 } | test-tool oid-array >actual &&