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