Author: bodewig
Date: Thu Dec 29 06:26:04 2011
New Revision: 1225447
URL: http://svn.apache.org/viewvc?rev=1225447&view=rev
Log:
assertResourceExists doesn't work with Ant 1.7.x and never will, document
workaround. PR 52332.
Modified:
ant/antlibs/antunit/trunk/docs/assertions.html
Modified: ant/antlibs/antunit/trunk/docs/assertions.html
URL:
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/docs/assertions.html?rev=1225447&r1=1225446&r2=1225447&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/docs/assertions.html (original)
+++ ant/antlibs/antunit/trunk/docs/assertions.html Thu Dec 29 06:26:04 2011
@@ -322,6 +322,21 @@
<assertResourceExists resource="${ant.home}/lib/ant.jar"/>
</pre>
+ <h3>Ant 1.7.x Note</h3>
+
+ <p><code>assertResourceExists</code> relies on Ant 1.8.0 or later,
+ it doesn't work with Ant 1.7.x. You can simulate the assertion
+ using the <code>resourceExists</code> condition
+ and <code>assertTrue</code>, for example</p>
+
+ <pre>
+ <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>
+ </pre>
+
<h2><a name="assertResourceDoesntExist">assertResourceDoesntExist</a></h2>
<p><em>Since AntUnit 1.2</em></p>
@@ -359,6 +374,21 @@
<assertResourceDoesntExist resource="${ant.home}/lib/ant.jar"/>
</pre>
+ <h3>Ant 1.7.x Note</h3>
+
+ <p><code>assertResourceDoesntExist</code> relies on Ant 1.8.0 or later,
+ it doesn't work with Ant 1.7.x. You can simulate the assertion
+ using the <code>resourceExists</code> condition
+ and <code>assertFalse</code>, for example</p>
+
+ <pre>
+ <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>
+ </pre>
+
<h2><a name="assertDestIsUptodate">assertDestIsUptodate</a></h2>
<p>Asserts that a dest file is more recent than the source