Fix test failing on Windows because of line feed assumption

The line separator length was assumed to be 1 byte wide, although it
could be 2 on some platforms (aka Windows).
This commit is contained in:
Baptiste Mathus committed 2017-01-01 14:43:07 +01:00
1 parent 9e05e0dec9
commit fceabf0f0f
1 file changed
+2 -1
+2 -1
View File
@@ -189,7 +189,8 @@ public class RunTest {
for (int i = 1; i < 10; i++) {
assertEquals("dummy" + (10+i), logLines.get(i));
}
assertEquals("[...truncated 68 B...]", logLines.get(0));
int truncatedCount = 10* ("dummyN".length() + System.getProperty("line.separator").length()) - 2;
assertEquals("[...truncated "+truncatedCount+" B...]", logLines.get(0));
}
@Test