aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features195/textblock/Code2.java
Commit message (Collapse)AuthorAgeFilesLines
* Improve text matching in OutputSpec, fixing some failing Windows testsAlexander Kriegisch2021-03-141-1/+1
| | | | | | | | | | | | | | | | | | Some Java 14 text block tests failed on Windows because a StringTokenizer was used to split by LF, but the Windows line separator is CR+LF. Because a multi-line string ending with CR+LF is printed via 'System.out.println' in the test code, another CR+LF is added to the output, resulting in trailing CR+LF+CR+LF. Hence, between the two LFs, the tokenizer actually found an additional line consisting of CR (only on Windows, of course). Despite each line token actually containing a trailing CR token, that did not matter much because 'String.trim' was used everywhere before comparing values. Anyway, the improved OutputSpec uses text.trim().split("\\s*\n\\s*"), which takes care of leading/trailing whitespace both around the whole output and for each separate line. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* first textblock test for Java13Andy Clement2019-11-251-0/+15