--- old/test/tools/launcher/TestHelper.java 2015-07-15 12:24:29.000000000 -0700 +++ new/test/tools/launcher/TestHelper.java 2015-07-15 12:24:29.000000000 -0700 @@ -594,7 +594,7 @@ } boolean notContains(String str) { - for (String x : testOutput) { + for (String x : testOutput) { if (x.contains(str)) { appendError("string <" + str + "> found"); return false; @@ -604,7 +604,7 @@ } boolean matches(String stringToMatch) { - for (String x : testOutput) { + for (String x : testOutput) { if (x.matches(stringToMatch)) { return true; } @@ -622,6 +622,16 @@ appendError("string <" + stringToMatch + "> found"); return false; } + + String findInOutput(String pattern) { + for (String x : testOutput) { + if (x.matches(pattern)) { + return x; + } + } + appendError("string <" + pattern + "> not found"); + return null; + } } /** * Indicates that the annotated method is a test method.