Sanitize escape sequences when verifying maven output
This commit is contained in:
@@ -6,6 +6,7 @@ void assertBuildLogHasLine(String expectedLine) {
|
|||||||
String line;
|
String line;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
|
line = line.replaceAll("\\u001b[^m]*m", "");
|
||||||
i++;
|
i++;
|
||||||
if (line.equals(expectedLine)) {
|
if (line.equals(expectedLine)) {
|
||||||
print("Expected line was found at line " + i + " of build log: " + "\"" + expectedLine + "\"");
|
print("Expected line was found at line " + i + " of build log: " + "\"" + expectedLine + "\"");
|
||||||
|
|||||||
Reference in New Issue
Block a user