Files
aji/docs/evaluation/dev-tasks/dev-shards/lang/zig/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

21 lines
544 B
Bash
Executable File

#!/bin/sh
# Public test: the example from the task statement.
zig build-exe main.zig 2>&1 || { echo "FAIL: build"; exit 1; }
got=$(printf '%s' 'workers 2
The cat sat.
the CAT, the hat
a-b-c
' | ./main) || { echo "FAIL: the program exited with an error"; exit 1; }
expected=$(printf "%s" 'worker 0 lines 2 words 6
worker 1 lines 1 words 4
distinct 7
the 3
cat 2
a 1
b 1
c 1
hat 1
sat 1
')
if [ "$got" = "$expected" ]; then echo PASS; else echo "FAIL"; echo "--- expected"; printf '%s' "$expected"; echo "--- got"; printf '%s' "$got"; exit 1; fi