✓
Passing This code compiles and runs correctly.
Code
// Pins that `koruc run` / `koruc build` with no input file exit non-zero.
// They already printed "Error: no input file specified"; they used to then
// `return` from main and exit 0, so a script, Makefile, or hook could not
// tell the error from success. Sibling: 310_115 (the `deps <module>` swap
// already exits 1). Blindness: no test invoked koruc with no file, and
// none asserted a CLI verb's exit status. Bare `koruc` (no args) is usage
// and still exits 0 — that is a different path.
~tor main {}
~proc main|zig {
}
~main()
Flows
flow ~main click a branch to expand · @labels scroll to their anchor
main
Test Configuration
MUST_RUN
Post-validation Script:
#!/bin/bash
set -e
# Missing input is a user error. Printing it and exiting 0 is the same
# observation as success — Q1 in challenges/018_FIX_QUEUE.md.
if OUT=$(koruc run 2>&1); then
echo "FAIL: 'koruc run' with no file exited 0"
echo "$OUT"
exit 1
fi
echo "$OUT" | grep -q "no input file specified" || { echo "FAIL: koruc run: no missing-file diagnostic"; echo "$OUT"; exit 1; }
if OUT=$(koruc build 2>&1); then
echo "FAIL: 'koruc build' with no file exited 0"
echo "$OUT"
exit 1
fi
echo "$OUT" | grep -q "no input file specified" || { echo "FAIL: koruc build: no missing-file diagnostic"; echo "$OUT"; exit 1; }
# Controls: help, no-args usage, and the toolchain check are still success.
koruc --help > /dev/null 2>&1 || { echo "FAIL: 'koruc --help' broke"; exit 1; }
koruc > /dev/null 2>&1 || { echo "FAIL: bare 'koruc' (usage) broke"; exit 1; }
koruc deps > /dev/null 2>&1 || { echo "FAIL: bare 'koruc deps' broke"; exit 1; }
echo "=== Test passed: missing input exits non-zero; help and deps still succeed ==="