diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-14 14:44:14 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-14 14:44:14 +0700 |
commit | 544f836d7e9b18e85b7a8940d06fd3538706dbf7 (patch) | |
tree | 1143477b75964c0700e45dcb7718fb9d4ede8eb7 /testing/src | |
parent | ef21abde05b925df6774f872437812fff1b3f9ee (diff) | |
download | aspectj-544f836d7e9b18e85b7a8940d06fd3538706dbf7.tar.gz aspectj-544f836d7e9b18e85b7a8940d06fd3538706dbf7.zip |
Fix OutputSpec corner case (test empty output) from @052bd66f
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'testing/src')
-rw-r--r-- | testing/src/test/java/org/aspectj/testing/OutputSpec.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/OutputSpec.java b/testing/src/test/java/org/aspectj/testing/OutputSpec.java index 9d334386a..f8c96077f 100644 --- a/testing/src/test/java/org/aspectj/testing/OutputSpec.java +++ b/testing/src/test/java/org/aspectj/testing/OutputSpec.java @@ -123,6 +123,7 @@ public class OutputSpec { private String[] getTrimmedLines(String text) { // Remove leading/trailing empty lines and leading/trailing whitespace from each line - return text.trim().split("\\s*\n\\s*"); + String[] trimmedLines = text.trim().split("\\s*\n\\s*"); + return trimmedLines.length == 1 && trimmedLines[0].equals("") ? new String[0] : trimmedLines; } } |