diff options
| author | 2026-10-14 05:55:19 +0000 | |
|---|---|---|
| committer | 2026-10-14 05:55:19 +0000 | |
| commit | 05f7b7e09ad503e4eac4f757de0d7329174f6437 (patch) | |
| tree | 768931192a69eff878d8f149c418fff55b0fdf8e /tests/runerr.sh | |
| parent | docs: archive the frozen stage code as one compressed tarball (diff) | |
analyzer: close the ownership gaps that stopped the compiler compiling itself
an owned local can now move into a released owner declared in the same or an
outer block, and g = m*x lends a local owner to a global until the global is
assigned again in the same block. leaving that block, giving the local away, or
returning while the lend is open is an error. recasting a plain local now names
it and says it has no ownership to recast.
methdef and syntax_resident use the supported spellings, so make genome reaches
its fixpoint from a clean checkout. runerr.sh reads the first // expect: line,
since the include headers moved it off line 1.
Diffstat (limited to 'tests/runerr.sh')
| -rwxr-xr-x | tests/runerr.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/runerr.sh b/tests/runerr.sh index 23ea054..f7e668c 100755 --- a/tests/runerr.sh +++ b/tests/runerr.sh @@ -1,9 +1,9 @@ #!/bin/bash # runs every .zc in a folder (tests/errors by default) and checks the compiler -# rejects it with the message on its first line: // expect: ... +# rejects it with the message on its first `// expect: ...` line vm=${1:-zy}; dir=${2:-$(dirname "$0")/errors}; pass=0; fail=0 for f in "$dir"/*.zc; do - want=$(head -1 "$f" | sed 's#^// expect: ##') + want=$(grep -m1 '^// expect: ' "$f" | sed 's#^// expect: ##') got=$($vm < "$f" 2>&1 | head -1) if [[ "$got" == *"$want"* ]]; then pass=$((pass+1)); else fail=$((fail+1)); echo "FAIL $(basename $f): got [$got]"; fi done |
