Skip to content

Commit 8716a94

Browse files
committed
Fix test for Windows.
1 parent e7c2a10 commit 8716a94

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/OrchardCoreContrib.PoExtractor.Tests/PluginTests.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ public async Task ProcessPluginsBasicJsonLocalizationProcessor()
6161
Assert.Equal(CleanupSpaces(expectedResult), CleanupSpaces(actualResult));
6262
}
6363

64-
private static string CleanupSpaces(string input) =>
65-
Regex.Replace(input.Trim(), @"^\s+", string.Empty, RegexOptions.Multiline);
64+
private static string CleanupSpaces(string input)
65+
{
66+
// Trim leading whitespaces.
67+
input = Regex.Replace(input.Trim(), @"^\s+", string.Empty, RegexOptions.Multiline);
68+
69+
// Make the path OS-specific, so the test works on Windows as well.
70+
return input.Replace('/', Path.DirectorySeparatorChar);
71+
}
6672
}

0 commit comments

Comments
 (0)