Browse Source

-test for hasfreespace condition

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@486141 13f79535-47bb-0310-9956-ffa450edef68
master
Kevin Jackson 18 years ago
parent
commit
a85674a29c
1 changed files with 36 additions and 0 deletions
  1. +36
    -0
      src/tests/antunit/taskdefs/condition/hasfreespace-test.xml

+ 36
- 0
src/tests/antunit/taskdefs/condition/hasfreespace-test.xml View File

@@ -0,0 +1,36 @@
<?xml version="1.0"?>
<project name="hasfreespace-test" default="all" basedir="." xmlns:au="antlib:org.apache.ant.antunit">
<target name="test-not-enough-space-human">
<au:assertFalse>
<hasfreespace partition="c:" needed="1P"/>
</au:assertFalse>
</target>
<target name="test-enough-space-human">
<au:assertTrue>
<hasfreespace partition="c:" needed="1K"/>
</au:assertTrue>
</target>
<target name="test-not-enough-space">
<property name="long.max-value" value="9223372036854775807"/>
<au:assertFalse>
<hasfreespace partition="c:" needed="${long.max-value}"/>
</au:assertFalse>
</target>
<target name="test-enough-space">
<au:assertTrue>
<hasfreespace partition="c:" needed="1"/>
</au:assertTrue>
</target>
<target name="all">
<au:antunit>
<fileset file="${ant.file}"/>
<au:plainlistener/>
</au:antunit>
</target>
</project>

Loading…
Cancel
Save