Skip to content

Commit

Permalink
Fix tests to work on windows too.
Browse files Browse the repository at this point in the history
  • Loading branch information
big-andy-coates committed Dec 22, 2023
1 parent ef77742 commit 95508ac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,15 +555,15 @@ void shouldImplementToStringOnMinimalOptions() {
@Test
void shouldImplementToStringOnFullOptions() {
// Given:
final Path mrS0 = Path.of(File.separator, "a", "b");
final Path mrD0 = Path.of(File.separator, "c");
final Path mrS0 = Path.of("a", "b");
final Path mrD0 = Path.of("c");
final Path mrS1 = Path.of("d", "e");
final Path mrD1 = Path.of(File.separator, "f");
final Path mrD1 = Path.of("f");

final Path mwS0 = Path.of(File.separator, "a");
final Path mwD0 = Path.of(File.separator, "b", "c");
final Path mwS1 = Path.of(File.separator, "d");
final Path mwD1 = Path.of(File.separator, "f");
final Path mwS0 = Path.of("a");
final Path mwD0 = Path.of("b", "c");
final Path mwS1 = Path.of("d");
final Path mwD1 = Path.of("g");

final String[] args =
minimalArgs(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void shouldSerializeFailed() throws Exception {
+ lineSeparator()
+ " <failure message=\"Expectation not met\""
+ " type=\"java.lang.AssertionError\">"
+ stackTrace
+ stackTrace.replaceAll("\r", "&#xd;")
+ "</failure>"
+ lineSeparator()
+ "</testcase>"
Expand All @@ -133,7 +133,7 @@ void shouldSerializeError() throws Exception {
+ lineSeparator()
+ " <error message=\"bad state\""
+ " type=\"java.lang.IllegalStateException\">"
+ stackTrace.replaceAll(lineSeparator(), "\n")
+ stackTrace.replaceAll("\r", "&#xd;")
+ "</error>"
+ lineSeparator()
+ "</testcase>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void shouldSerializeSuiteError() throws Exception {
+ lineSeparator()
+ " <error message=\"Boom\""
+ " type=\"java.lang.IllegalArgumentException\">"
+ stackTrace.replaceAll(lineSeparator(), "\n")
+ stackTrace.replaceAll("\r", "&#xd;")
+ "</error>"
+ lineSeparator()
+ "</testsuite>"
Expand Down

0 comments on commit 95508ac

Please sign in to comment.