diff --git a/src/test/java/SolutionTest.java b/src/test/java/SolutionTest.java index aee63e4..3afa238 100644 --- a/src/test/java/SolutionTest.java +++ b/src/test/java/SolutionTest.java @@ -53,7 +53,14 @@ class SolutionTest { System.out.println( String.format( "Solution took %01d.%03d secs", duration / 1000, duration % 1000 )); try (BufferedReader chk = new BufferedReader( new InputStreamReader( new ByteArrayInputStream( bos.toByteArray() )))) { - assertEquals( expected, chk.readLine() ); + String[] expectedLines = expected.split( "\\s*[|]\\s*" ); + + int lineCount = 0; + String line; + for ( ; (line = chk.readLine()) != null; lineCount++ ) { + assertEquals( expectedLines[ lineCount ], line ); + } + assertEquals( expectedLines.length, lineCount ); } } finally {