Browse Source

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

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
pull/3794/head
Siegfried Pammer 3 weeks ago committed by Christoph Wille
parent
commit
679cf0ee6a
  1. 2
      ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs

2
ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs

@ -371,7 +371,7 @@ namespace ICSharpCode.Decompiler.Tests @@ -371,7 +371,7 @@ namespace ICSharpCode.Decompiler.Tests
{
if (File.Exists(Path.Combine(TestCasePath, "FSharp.Core.dll")))
return;
string fsharpCoreDll = Path.Combine(TestCasePath, "..\\..\\..\\ILSpy-tests\\FSharp\\FSharp.Core.dll");
string fsharpCoreDll = Path.Combine(TestCasePath, "..", "..", "..", "ILSpy-tests", "FSharp", "FSharp.Core.dll");
if (!File.Exists(fsharpCoreDll))
Assert.Ignore("Ignored because of missing ILSpy-tests repo. Must be checked out separately from https://github.com/icsharpcode/ILSpy-tests!");
File.Copy(fsharpCoreDll, Path.Combine(TestCasePath, "FSharp.Core.dll"));

Loading…
Cancel
Save