You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mb...@apache.org on 2007/05/14 17:15:01 UTC
svn commit: r537871 -
/ant/core/trunk/src/tests/antunit/taskdefs/condition/resourcecontains-test.xml
Author: mbenson
Date: Mon May 14 08:15:01 2007
New Revision: 537871
URL: http://svn.apache.org/viewvc?view=rev&rev=537871
Log:
ws; [delete, touch] => truncate
Modified:
ant/core/trunk/src/tests/antunit/taskdefs/condition/resourcecontains-test.xml
Modified: ant/core/trunk/src/tests/antunit/taskdefs/condition/resourcecontains-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/condition/resourcecontains-test.xml?view=diff&rev=537871&r1=537870&r2=537871
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/condition/resourcecontains-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/condition/resourcecontains-test.xml Mon May 14 08:15:01 2007
@@ -5,31 +5,30 @@
<target name="setUp">
<property name="file" location="${java.io.tmpdir}/test-resource.txt"/>
- <echo file="${file}" message="loads of text!"/>
+ <echo file="${file}" message="loads of text!"/>
</target>
<target name="tearDown">
<delete file="${file}"/>
</target>
-
+
<target name="testcontains">
- <au:assertFileExists file="${file}"/>
- <au:assertTrue message="Should have found the text in the resource">
- <resourcecontains resource="${file}" substring="text"/>
- </au:assertTrue>
+ <au:assertFileExists file="${file}"/>
+ <au:assertTrue message="Should have found the text in the resource">
+ <resourcecontains resource="${file}" substring="text"/>
+ </au:assertTrue>
</target>
-
+
<target name="testwithemptyfile">
- <delete file="${file}"/>
- <touch file="${file}"/>
- <au:assertFalse message="Should have found nothing as file is empty">
+ <truncate file="${file}"/>
+ <au:assertFalse message="Should have found nothing as file is empty">
<resourcecontains resource="${file}" substring="text"/>
- </au:assertFalse>
+ </au:assertFalse>
</target>
-
+
<target name="testdoesntcontain">
- <au:assertFalse message="Should have found nothing as file is empty">
- <resourcecontains resource="${file}" substring="futurama"/>
+ <au:assertFalse message="Should have found nothing as file is empty">
+ <resourcecontains resource="${file}" substring="futurama"/>
</au:assertFalse>
</target>
-</project>
\ No newline at end of file
+</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org