mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-11-30 09:04:33 -06:00
Follow-up to #9121, which broke the Windows unit tests on `main` ([run](https://github.com/compiler-explorer/compiler-explorer/actions/runs/34858174266)). The temp-dir mask split on `rootDir + '/'`. On Windows `rootDir` comes from `path.dirname` and has backslashes, so the split never matched, the mask did nothing, and the new test failed with: ``` AssertionError: expected ';; Function main (main)\n(insn 2 4 3 …' to contain '"/app/example.cpp":3:5' ``` Linux was unaffected, which is why the PR's own CI was green. Fix: split on `rootDir + path.sep`, and on Windows also on the forward-slash spelling of the dir, since GCC there may print either. The test now covers both spellings, with the forward-slash case built from `path.sep` so it exercises the second branch only where it exists. Nothing else changes: on Linux `path.sep` is `/`, so the behaviour is identical to what shipped in #9121. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>