From efc648b6210d93e0666495fa8776e0ea743fc2e0 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 29 Dec 2011 06:26:04 +0000 Subject: [PATCH] assertResourceExists doesn't work with Ant 1.7.x and never will, document workaround. PR 52332. git-svn-id: https://svn.apache.org/repos/asf/ant/antlibs/antunit/trunk@1225447 13f79535-47bb-0310-9956-ffa450edef68 --- docs/assertions.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/assertions.html b/docs/assertions.html index 0a0b810..da53a51 100644 --- a/docs/assertions.html +++ b/docs/assertions.html @@ -322,6 +322,21 @@ <assertResourceExists resource="${ant.home}/lib/ant.jar"/> +

Ant 1.7.x Note

+ +

assertResourceExists relies on Ant 1.8.0 or later, + it doesn't work with Ant 1.7.x. You can simulate the assertion + using the resourceExists condition + and assertTrue, for example

+ +
+      <au:assertTrue message="Expected resource '${ant.home}/lib/ant.jar' to exist">
+        <au:resourceExists>
+          <file file="${ant.home}/lib/ant.jar"/>
+        </au:resourceExists>
+      </au:assertTrue>
+    
+

assertResourceDoesntExist

Since AntUnit 1.2

@@ -359,6 +374,21 @@ <assertResourceDoesntExist resource="${ant.home}/lib/ant.jar"/> +

Ant 1.7.x Note

+ +

assertResourceDoesntExist relies on Ant 1.8.0 or later, + it doesn't work with Ant 1.7.x. You can simulate the assertion + using the resourceExists condition + and assertFalse, for example

+ +
+      <au:assertFalse message="Didn't expect resource '${ant.home}/lib/ant.jar' to exist">
+        <au:resourceExists>
+          <file file="${ant.home}/lib/ant.jar"/>
+        </au:resourceExists>
+      </au:assertFalse>
+    
+

assertDestIsUptodate

Asserts that a dest file is more recent than the source