From 97ac9bc7c0b183d81ddd966edaa02896216f2b3b Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Sat, 14 Apr 2018 19:54:05 +0200 Subject: [PATCH] the assertion used to be conditional --- .../org/apache/tools/ant/types/RedirectorElementTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tests/junit/org/apache/tools/ant/types/RedirectorElementTest.java b/src/tests/junit/org/apache/tools/ant/types/RedirectorElementTest.java index db1c4f8bb..ee97275d7 100644 --- a/src/tests/junit/org/apache/tools/ant/types/RedirectorElementTest.java +++ b/src/tests/junit/org/apache/tools/ant/types/RedirectorElementTest.java @@ -75,8 +75,9 @@ public class RedirectorElementTest { @Test public void testLogInputString() { buildRule.executeTarget("testLogInputString"); - assertThat(buildRule.getFullLog(), both(containsString("testLogInputString can-cat")) - .and(containsString("Using input string"))); + if (buildRule.getLog().contains("testLogInputString can-cat")) { + assertThat(buildRule.getFullLog(), containsString("Using input string")); + } } @Test