Changeset 18562 in josm for trunk/test/unit


Ignore:
Timestamp:
2022-09-26T17:45:59+02:00 (20 months ago)
Author:
taylor.smock
Message:

See r18555: Fix tests on Windows

This occurred due to the changes to TestUtils.assertEqualsNewline assuming that
the actual text would include the system dependent newline. This is not always
the case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/TestUtils.java

    r18555 r18562  
    602602     */
    603603    public static void assertEqualsNewline(String expected, String actual) {
    604         String[] actualArray = actual.split(System.lineSeparator(), -1);
     604        String[] actualArray = actual.replace(System.lineSeparator(), "\n").split("\n", -1);
    605605        String[] expectedArray = expected.split("\n", -1);
    606606        assertAll(() -> assertEquals(expectedArray.length, actualArray.length, "Different number of newlines"),
Note: See TracChangeset for help on using the changeset viewer.