From 6f7be570f7b700f7b220b1e56ea032ddf5a2765f Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 7 Mar 2017 18:37:27 +0000 Subject: [PATCH] Another attempt at fixing OperationBlockMacroTests on Windows It appears that Asciidoctor uses \n on all platforms but when the expected content is read in on Windows it uses \r\n as the line endings are being changed when Git performs the clone. --- .../restdocs/asciidoctor/OperationBlockMacroTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-restdocs-asciidoctor/src/test/java/org/springframework/restdocs/asciidoctor/OperationBlockMacroTests.java b/spring-restdocs-asciidoctor/src/test/java/org/springframework/restdocs/asciidoctor/OperationBlockMacroTests.java index 8969e877..497f1e85 100644 --- a/spring-restdocs-asciidoctor/src/test/java/org/springframework/restdocs/asciidoctor/OperationBlockMacroTests.java +++ b/spring-restdocs-asciidoctor/src/test/java/org/springframework/restdocs/asciidoctor/OperationBlockMacroTests.java @@ -134,7 +134,7 @@ public class OperationBlockMacroTests { this.getClass().getResource("/operations/" + fileName + ".html").toURI()); String content = new String(Files.readAllBytes(filePath)); if (isWindows()) { - return content.replace("\n", "\r\n"); + return content.replace("\r\n", "\n"); } return content; }