From 89e42e7e3ee50454c87a61efab51aab3b4b73876 Mon Sep 17 00:00:00 2001 From: jjg Date: Tue, 20 Nov 2012 07:21:07 -0800 Subject: [PATCH] 8003649: regression/langtools: tools/javac/doctree Reviewed-by: ksrini --- test/tools/javac/doctree/DocCommentTester.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/tools/javac/doctree/DocCommentTester.java b/test/tools/javac/doctree/DocCommentTester.java index 48973e06..8a6775ab 100644 --- a/test/tools/javac/doctree/DocCommentTester.java +++ b/test/tools/javac/doctree/DocCommentTester.java @@ -176,6 +176,7 @@ public class DocCommentTester { * Verify the structure of the DocTree AST by comparing it against golden text. */ static class ASTChecker extends Checker { + static final String NEWLINE = System.getProperty("line.separator"); Printer printer = new Printer(); String source; @@ -197,7 +198,7 @@ public class DocCommentTester { DocCommentTree dc = trees.getDocCommentTree(path); printer.print(dc, out); out.flush(); - String found = out.toString(); + String found = out.toString().replace(NEWLINE, "\n"); // Look for the first block comment after the first occurrence of name int start = source.indexOf("\n/*\n", findName(source, name)); -- GitLab