diff --git a/tests/test_bif_mem.sh b/tests/test_bif_mem.sh index a126b31..d5093be 100755 --- a/tests/test_bif_mem.sh +++ b/tests/test_bif_mem.sh @@ -188,6 +188,8 @@ plant() { rm -rf "$tree"; mkdir -p "$tree/tests" cp "$ROOT"/*.eigs "$tree/" cp "$ROOT"/tests/*.eigs "$tree/tests/" + # EigenScript v0.43.0 (#1106): planted $TMP trees need eigs.json for imports + cp "$ROOT"/eigs.json "$tree/" python3 - "$tree/orbit.eigs" "$needle" "$repl" <<'PY_END' import sys path, needle, repl = sys.argv[1], sys.argv[2], sys.argv[3] diff --git a/tests/test_bifurcation.sh b/tests/test_bifurcation.sh index 29a65bd..5d7d345 100755 --- a/tests/test_bifurcation.sh +++ b/tests/test_bifurcation.sh @@ -115,6 +115,10 @@ plant() { rm -rf "$tree"; mkdir -p "$tree/tests" cp logistic.eigs "$tree/" cp tests/bifurcation_oracle.eigs "$tree/tests/" + # EigenScript v0.43.0 (#1106): import/load_file need project-root eigs.json + # (cwd no longer resolves). Without this, planted trees under $TMP die on + # `import logistic` before the oracle assertions can catch the fault. + cp eigs.json "$tree/" python3 - "$tree/logistic.eigs" "$needle" "$repl" <<'PY' import sys path, needle, repl = sys.argv[1], sys.argv[2], sys.argv[3] diff --git a/tests/test_lint.sh b/tests/test_lint.sh index 0125753..886e0e9 100755 --- a/tests/test_lint.sh +++ b/tests/test_lint.sh @@ -46,6 +46,7 @@ echo "PASS: all $N .eigs files lint clean" echo "--- planted fault: an unused variable ---" mkdir -p "$TMP/fault/tests" cp ./*.eigs "$TMP/fault/" +cp eigs.json "$TMP/fault/" printf 'DEAD_CONSTANT is 42\nprint of "hi"\n' > "$TMP/fault/planted.eigs" if lint_tree "$TMP/fault" quiet; then echo "FAIL: an unused variable passed the lint gate — the gate isn't running" diff --git a/tests/test_orbit_hist.sh b/tests/test_orbit_hist.sh index 6d3dff0..08c65fc 100755 --- a/tests/test_orbit_hist.sh +++ b/tests/test_orbit_hist.sh @@ -15,7 +15,6 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)" cd "$ROOT" TMP="$(mktemp -d)" -trap "rm -rf '$TMP'" EXIT field() { echo "$1" | grep -E "^$2 " | awk '{print $2}'; } @@ -62,9 +61,15 @@ check "$OUT" || exit 1 echo "PASS: dump path keeps the whole trajectory; interactive path stays bounded and display-identical" # Planted fault: drop the cap and the bound assertion must catch it. -sed 's/^trimmed.cap is orbit.HIST_CAP$/trimmed.cap is 0/' tests/orbit_hist_dump.eigs > "$TMP/nocap.eigs" -cmp -s tests/orbit_hist_dump.eigs "$TMP/nocap.eigs" && { echo "FAIL: planted-fault substitution did not apply"; exit 1; } -FOUT=$("$EIGS" "$TMP/nocap.eigs" 2>&1) +# Write under the repo (not $TMP): EigenScript v0.43.0 (#1106) resolves +# `import orbit` via file-relative then project-root (eigs.json). A copy +# under /tmp has neither, so the fault run died before the checker ran and +# `set -e` turned that into a silent suite red on the v0.43.0 pin bump. +PLANT="tests/.nocap_orbit_hist.eigs" +trap "rm -rf '$TMP' '$PLANT'" EXIT +sed 's/^trimmed.cap is orbit.HIST_CAP$/trimmed.cap is 0/' tests/orbit_hist_dump.eigs > "$PLANT" +cmp -s tests/orbit_hist_dump.eigs "$PLANT" && { echo "FAIL: planted-fault substitution did not apply"; exit 1; } +FOUT=$("$EIGS" "$PLANT" 2>&1) if check "$FOUT" quiet; then echo "FAIL: planted fault (cap removed) passed the bound check — the checker can't discriminate" exit 1