Skip to content

Commit e0c12a9

Browse files
committed
Fix cross-platform test for path deduplication
Skip PathDeduplication_RemovesDuplicatesWithMixedSeparators on non-Windows platforms since backslash is a valid filename character on Linux/macOS, not a path separator.
1 parent d3c755d commit e0c12a9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/MvcFrontendKit.Tests/DevCommandTests.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,18 @@ public void CollectFilesFromConfig_IsCaseInsensitive()
228228
[Fact]
229229
public void PathDeduplication_RemovesDuplicatesWithMixedSeparators()
230230
{
231+
// On Linux/macOS, backslash is a valid filename character, not a path separator
232+
// This test only makes sense on Windows where both / and \ are path separators
233+
if (!OperatingSystem.IsWindows())
234+
{
235+
return; // Skip on non-Windows platforms
236+
}
237+
231238
var projectRoot = _tempDir;
232239
var files = new List<string>
233240
{
234241
"wwwroot/js/site.ts",
235-
@"wwwroot\js\site.ts", // Same file, different separator
242+
@"wwwroot\js\site.ts", // Same file, different separator (Windows only)
236243
"wwwroot/js/Home/Index.ts"
237244
};
238245

0 commit comments

Comments
 (0)