mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-130394 TestNG, diff link is not displayed when hamcrest is used
This commit is contained in:
@@ -52,6 +52,8 @@ public class TestProxy extends AbstractTestProxy {
|
||||
Pattern.compile("(.*)expected not same with:\\<(.*)\\> but was same:\\<(.*)\\>.*", Pattern.DOTALL);
|
||||
@NonNls public static final Pattern EXPECTED_BUT_FOUND_PATTERN =
|
||||
Pattern.compile("(.*)expected \\[(.*)\\] but found \\[(.*)\\].*", Pattern.DOTALL);
|
||||
@NonNls public static final Pattern EXPECTED_BUT_WAS_HAMCREST_PATTERN =
|
||||
Pattern.compile("(.*)\nExpected: .*?\"(.*)\"\n\\s*but: .*?\"(.*)\".*", Pattern.DOTALL);
|
||||
private final List<TestProxy> results = new ArrayList<TestProxy>();
|
||||
private TestResultMessage resultMessage;
|
||||
private String name;
|
||||
@@ -371,6 +373,9 @@ public class TestProxy extends AbstractTestProxy {
|
||||
if (appendDiffChuncks(result, s, printables, EXPECTED_BUT_FOUND_PATTERN)) {
|
||||
return printables;
|
||||
}
|
||||
if (appendDiffChuncks(result, s, printables, EXPECTED_BUT_WAS_HAMCREST_PATTERN)) {
|
||||
return printables;
|
||||
}
|
||||
printables.add(new Chunk(s, ConsoleViewContentType.ERROR_OUTPUT));
|
||||
return printables;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user