| test_description='basic tests for the oidtree implementation' |
| TEST_PASSES_SANITIZE_LEAK=true |
| maxhexsz=$(test_oid hexsz) |
| difference=$(($maxhexsz - ${#shortoid})) |
| printf "%s%s%0${difference}d\\n" "$prefix" "$shortoid" "0" |
| test_expect_success 'oidtree insert and contains' ' |
| echoid insert 444 1 2 3 4 5 a b c d e && |
| echoid contains 44 441 440 444 4440 4444 && |
| } | test-tool oidtree >actual && |
| test_expect_success 'oidtree each' ' |
| echoid "" 123 321 321 >expect && |
| echoid insert f 9 8 123 321 a b c d e && |
| } | test-tool oidtree >actual && |