Skip to content

Use cross-platform separators for the FSharp.Core.dll test path - #3788

Merged
christophwille merged 1 commit into
masterfrom
fix-fsharp-coredll-test-path
Jun 16, 2026
Merged

Use cross-platform separators for the FSharp.Core.dll test path#3788
christophwille merged 1 commit into
masterfrom
fix-fsharp-coredll-test-path

Conversation

@siegfriedpammer

Copy link
Copy Markdown
Member

Problem

ILPrettyTestRunner.CopyFSharpCoreDll() locates ILSpy-tests/FSharp/FSharp.Core.dll with a hardcoded Windows path:

string fsharpCoreDll = Path.Combine(TestCasePath, "..\\..\\..\\ILSpy-tests\\FSharp\\FSharp.Core.dll");

On non-Windows, \ is an ordinary filename character, so this becomes a single bogus path, File.Exists always returns false, and the FSharp ILPretty tests (FSharpLoops, FSharpUsing) get Assert.Ignore'd — even when ILSpy-tests is checked out. They have effectively never run on Linux/macOS.

Fix

Build the path from Path.Combine segments so it resolves on every platform. Same target (three levels up from the ILPretty test-case directory, which is where the ILSpy-tests submodule lives), just no embedded separators.

Verification (Linux)

With ILSpy-tests checked out, FSharpLoops_Debug/_Release now run and pass instead of being skipped:

total: 2  succeeded: 2  skipped: 0

Test-only change; no production code affected.

CopyFSharpCoreDll built the ILSpy-tests path with hardcoded Windows backslashes
("..\\..\\..\\ILSpy-tests\\FSharp\\FSharp.Core.dll"). On non-Windows, '\' is a
normal filename character, so the whole string became a single bogus path,
File.Exists always returned false, and the FSharp ILPretty tests were silently
Assert.Ignore'd even when ILSpy-tests was checked out. Build the path from
Path.Combine segments instead so it resolves on every platform (same target:
three levels up from the ILPretty test-case directory).

Assisted-by: Claude:claude-opus-4-8:Claude Code
@christophwille
christophwille merged commit 679cf0e into master Jun 16, 2026
13 checks passed
@christophwille
christophwille deleted the fix-fsharp-coredll-test-path branch June 16, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants