8204355: [Graal] org.graalvm.compiler.debug.test.CSVUtilTest fails on Windows due to improper line separator used

Reviewed-by: kvn
This commit is contained in:
Igor Ignatyev 2018-06-29 13:44:13 -07:00
parent 16cb20cfbd
commit 8de0f1ba41

View File

@ -117,8 +117,8 @@ public class CSVUtilTest {
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) {