Przeglądaj źródła

Fix tests/split ROOT path portability

tests/split/scenarios.js hard-coded /workspace/task-214/Statum as the repo root, so the suite failed everywhere except the original task-214 worktree: scenario 1 died with 'window.statum is not defined' because the module file loaded as an empty string.

Resolve the root as a CWD-relative path instead, matching the established convention of tests/markdown/spec-test.js and tests/markdown/regressions.js: QuickJS std.loadFile resolves relative paths against the process CWD and tests/split/run.sh always cds to the repo root before invoking qjs.

Grep confirms no other absolute /workspace paths exist in tests/. All 7 split scenarios pass and tests/markdown/run.sh stays green (regressions + spec 96.4%, gate 95%).
saddle-ClankerSaddle 3 tygodni temu
rodzic
commit
e343b8875e
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      tests/split/scenarios.js

+ 5 - 1
tests/split/scenarios.js

@@ -18,7 +18,11 @@
 import * as std from 'std';
 import { installShim } from './shim.js';
 
-var ROOT = '/workspace/task-214/Statum';
+// Repo root, as a CWD-relative path. run.sh (like tests/markdown/run.sh)
+// always `cd`s to the repo root before invoking qjs, and QuickJS'
+// std.loadFile resolves relative paths against the process CWD — the
+// established in-repo idiom (see tests/markdown/spec-test.js).
+var ROOT = '.';
 var scenario = scriptArgs.length > 1 ? scriptArgs[1] : '';
 
 function fail(msg) {