3 test_description
='basic tests for the oidtree implementation'
6 maxhexsz
=$
(test_oid hexsz
)
14 difference
=$
(($maxhexsz - ${#shortoid}))
15 printf "%s%s%0${difference}d\\n" "$prefix" "$shortoid" "0"
19 test_expect_success
'oidtree insert and contains' '
20 cat >expect <<-\EOF &&
29 echoid insert 444 1 2 3 4 5 a b c d e &&
30 echoid contains 44 441 440 444 4440 4444
32 } | test-tool oidtree >actual &&
33 test_cmp expect actual
36 test_expect_success
'oidtree each' '
37 echoid "" 123 321 321 >expect &&
39 echoid insert f 9 8 123 321 a b c d e
45 } | test-tool oidtree >actual &&
46 test_cmp expect actual