8204355: [Graal] org.graalvm.compiler.debug.test.CSVUtilTest fails on Windows due to improper line separator used
Reviewed-by: kvn
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java Fri Jun 29 13:44:09 2018 -0700
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java Fri Jun 29 13:44:13 2018 -0700
@@ -117,8 +117,8 @@
CSVUtil.Escape.println(new PrintStream(outputStream), format, toObjectArray(args));
// get the actual string
String printedStream = new String(outputStream.toByteArray(), StandardCharsets.UTF_8);
- // remove newline
- assertEquals(expected, printedStream.substring(0, printedStream.length() - 1));
+ // add newline to the expected string
+ assertEquals(expected + System.lineSeparator(), printedStream);
}
private static Object[] toObjectArray(String args) {