Tests were failing due to a bug in the compare error output part of the test runner.

This commit is contained in:
Reinier Zwitserloot committed 2010-11-10 23:48:30 +01:00
1 parent 40b76b5046
commit a0847b4c38
1 file changed
+3 -1
@@ -45,7 +45,9 @@ public class RunTestsViaDelombok extends AbstractRunTests {
delombok.setDiagnosticsListener(new DiagnosticListener<JavaFileObject>() {
@Override public void report(Diagnostic<? extends JavaFileObject> d) {
String msg = d.getMessage(Locale.ENGLISH);
Matcher m = Pattern.compile("^" + Pattern.quote(file.getAbsolutePath()) + "\\s*:\\s*\\d+\\s*:\\s*(?:warning:\\s*)?(.*)$").matcher(msg);
Matcher m = Pattern.compile(
"^" + Pattern.quote(file.getAbsolutePath()) +
"\\s*:\\s*\\d+\\s*:\\s*(?:warning:\\s*)?(.*)$", Pattern.DOTALL).matcher(msg);
if (m.matches()) msg = m.group(1);
messages.append(String.format("%d:%d %s %s\n", d.getLineNumber(), d.getColumnNumber(), d.getKind(), msg));
}