| 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | export PYTHONPYCACHEPREFIX="$(mktemp -d)" |
| 4 | python3 - <<'PY' |
| 5 | import index |
| 6 | idx = index.build({1: "red fox.", 2: "Red hen"}) |
| 7 | assert index.lookup(idx, "red") == [1, 2], index.lookup(idx, "red") |
| 8 | idx = index.build({7: "end."}) |
| 9 | assert index.lookup(idx, "end") == [7] |
| 10 | PY |
| 11 |