Files
aji/docs/evaluation/dev-tasks/dev-intervals/lang/aji_air/test.sh
T
dev e3fc896a0a wip: shield index relations, dev evaluation tasks, Q-063 audit notes
Verifier borrow/provenance work, new phase3 shield_index conformance cases,
dev-intervals/dev-lru/dev-shards tasks with evaluate.py harness, and agent skill/hook config.
2026-10-17 12:30:37 +03:00

20 lines
708 B
Bash
Executable File

#!/bin/sh
# Public test: the example from the task statement.
rec=$(aji run --fuel 400000000 --grant in=io.read --grant out=io.write --grant heap=mem.alloc:4194304 --stdin 'add 10 20
add 20 25
covered 24
remove 12 14
list
count
total
add 5 5
' main.air)
got=$(printf '%s' "$rec" | python3 -c 'import json,sys; r=json.load(sys.stdin); print(r.get("stdout","") if r.get("status")=="returned" else "<status "+str(r.get("status"))+">", end="")') || { echo "FAIL: no run record"; echo "$rec"; exit 1; }
expected=$(printf "%s" 'yes
10-12 14-25
2
13
error
')
if [ "$got" = "$expected" ]; then echo PASS; else echo "FAIL"; echo "--- expected"; printf '%s' "$expected"; echo "--- got"; printf '%s' "$got"; exit 1; fi