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
This commit is contained in:
parent
e751bcabf6
commit
efc648b621
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue