You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2011/01/25 10:43:28 UTC
svn commit: r1063192 - in /ant/antlibs/antunit/trunk: changes.xml
src/main/org/apache/ant/antunit/antlib.xml
Author: bodewig
Date: Tue Jan 25 09:43:27 2011
New Revision: 1063192
URL: http://svn.apache.org/viewvc?rev=1063192&view=rev
Log:
verify a resource exists prior to validating its contents
Modified:
ant/antlibs/antunit/trunk/changes.xml
ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml
Modified: ant/antlibs/antunit/trunk/changes.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/changes.xml?rev=1063192&r1=1063191&r2=1063192&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/changes.xml (original)
+++ ant/antlibs/antunit/trunk/changes.xml Tue Jan 25 09:43:27 2011
@@ -38,6 +38,12 @@
</properties>
<release version="1.2" date="not-released">
+ <action type="update" breaks-bwc="true">
+ assertResourceContains now first validates that the given
+ resource actually exists using assertResourceExists - this may
+ lead to a different error message than the ones generated with
+ AntUnit 1.1.
+ </action>
<action type="add">
New assertion assertResourceExists and assertResourceDoesntExist
have been added.
Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml?rev=1063192&r1=1063191&r2=1063192&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml Tue Jan 25 09:43:27 2011
@@ -175,6 +175,7 @@ under the License.
<attribute name="message"
default="Expected resource '@{resource}' to contain value '@{value}' but was '${@{resource}}'"/>
<sequential>
+ <au:assertResourceExists resource="@{resource}"/>
<au:fail message="@{message}">
<resourcecontains resource="@{resource}" substring="@{value}"
casesensitive="@{casesensitive}"/>