✓
Passing This code compiles and runs correctly.
Code
// Hello World in pure Koru.
// This is the frontpage example from korulang.org.
//
// Also pins consumed-transform exclusion: after print.blk runs, the
// program unit must not ship `__printInterpolate` or `@import("ast")`.
// post.sh greps output_emitted.zig.
import std/io
std/io:print.blk {
{% if debug %}[DEBUG] {% endif %}Hello, {{ name:s }}!
The answer is {{ count:d }}.
}
Actual
[DEBUG] Hello, World!
The answer is 42.
Expected output
✓ Zig✓ JavaScript[DEBUG] Hello, World!
The answer is 42.
Test Configuration
MUST_RUN LANGUAGES: zig js
Post-validation Script:
#!/bin/bash
# Pins that a consumed print.blk does not ship its comptime engines in
# the program unit. The engines already ran; @import("ast") here is the
# corpse. backend_output_emitted.zig is the compiler — it keeps them.
set -u
if [ ! -f output_emitted.zig ]; then
echo "FAIL: no output_emitted.zig"
exit 1
fi
if grep -q '@import("ast")' output_emitted.zig; then
echo "FAIL: program unit still imports ast (consumed print engines)"
exit 1
fi
if grep -q '__printInterpolate' output_emitted.zig; then
echo "FAIL: program unit still contains __printInterpolate"
exit 1
fi
echo "PASS: consumed print engines excluded from program unit"
exit 0