ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r537346 - /ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml
Date Sat, 12 May 2007 06:11:04 GMT
Author: kevj
Date: Fri May 11 23:11:04 2007
New Revision: 537346

URL: http://svn.apache.org/viewvc?view=rev&rev=537346
Log:
-add new macro based on resourcecontains

Modified:
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/antlib.xml

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?view=diff&rev=537346&r1=537345&r2=537346
==============================================================================
--- 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 Fri May 11 23:11:04
2007
@@ -128,6 +128,20 @@
     </sequential>
   </macrodef>
 
+  <macrodef name="assertResourceContains">
+	<attribute name="resource"/>
+	<attribute name="value"/>
+	<attribute name="casesensitive" default="true"/>
+	<attribute name="message"
+	  default="Expected resource '@{resource}' to contain value '@{value}' but was '${@{resource}}'"/>
+    <sequential>
+	  <au:assertFileExists file="@{resource}"/>
+	  <au:assertTrue message="@{message}">
+	    <resourcecontains resource="@{resource}" substring="@{value}"/>
+	  </au:assertTrue>
+	</sequential>
+  </macrodef>
+
   <macrodef name="assertDestIsUptodate" backtrace="false">
     <attribute name="src"/>
     <attribute name="dest"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message