Skip to content

Commit ce9ecd8

Browse files
committed
🧪 Fixed test that failed on Linux
Using what is essentially the same code in the test as what is being tested is not ideal, but it works around the difference in behaviours by the Path object on different platforms. This relates to issue #32.
1 parent 5d52d11 commit ce9ecd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎fluentforms/core/src/test/java/com/_4point/aem/fluentforms/api/PathOrUrlTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ void testToUnixString(String path) {
321321
assertTrue(result.isPath(), "Expected that isPath() would be true");
322322
assertFalse(result.isUrl(), "Expected that isUrl() would be false");
323323
assertFalse(result.isCrxUrl(), "Expected that isCrxUrl() would be false");
324-
String expected = pathPath.toString().replace('\\', '/');
324+
String expected = pathPath.getFileSystem().getSeparator().equals("\\") ? pathPath.toString().replace('\\', '/') : pathPath.toString();
325325
assertEquals(expected, result.toUnixString());
326326
}
327327

0 commit comments

Comments
 (0)