summaryrefslogtreecommitdiff
path: root/ant-openjdk-jpeg-cmyk.patch
blob: 2c0bdfc4ecaae16fcce6abfcccf863f90475388e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java
index 537a4e8ffaf3af22..bfc8a011ad4b21f8 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java
@@ -28,6 +28,7 @@ import org.junit.rules.ExpectedException;
 
 import java.io.File;
 
+import static org.hamcrest.Matchers.anyOf;
 import static org.hamcrest.Matchers.containsString;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
@@ -132,13 +133,13 @@ public class ImageIOTest {
 
     @Test
     public void testFailOnError() {
-        final String message = "Unsupported Image Type";
         thrown.expect(BuildException.class);
-        thrown.expectMessage(message);
         try {
             buildRule.executeTarget("testFailOnError");
         } finally {
-            assertThat(buildRule.getLog(), containsString(message));
+            assertThat(buildRule.getLog(),
+                anyOf(containsString("Unsupported Image Type"),
+                    containsString("Unknown image type")));
         }
     }