Skip to content

Commit

Permalink
Merge pull request #2032 from devinbileck/handle-cli-output_windows.t…
Browse files Browse the repository at this point in the history
…xt-with-CRLF-line-endings

Handle cli-output_windows.txt with CRLF line endings
  • Loading branch information
ManfredKarrer authored Dec 3, 2018
2 parents 8c7bd76 + f379918 commit 6068106
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/test/java/bisq/core/app/BisqHelpFormatterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ public void testHelpFormatter() throws IOException, URISyntaxException {
ByteArrayOutputStream actual = new ByteArrayOutputStream();
String expected = new String(Files.readAllBytes(Paths.get(getClass().getResource("cli-output.txt").toURI())));
if (System.getProperty("os.name").startsWith("Windows")) {
expected = new String(Files.readAllBytes(Paths.get(getClass().getResource("cli-output_windows.txt").toURI())));
// Load the expected content from a different file for Windows due to different path separator
// And normalize line endings to LF in case the file has CRLF line endings
expected = new String(Files.readAllBytes(Paths.get(getClass().getResource("cli-output_windows.txt").toURI())))
.replaceAll("\\r\\n?", "\n");
}

parser.printHelpOn(new PrintStream(actual));
Expand Down

0 comments on commit 6068106

Please sign in to comment.