Hi all,
Sorry about this one, I should have thought of using ${user.home} for
the tests instead of hard-coded c:
Good catch Steve
Kev
On 4/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Author: stevel
Date: Mon Apr 23 07:11:46 2007
New Revision: 531472
URL: http://svn.apache.org/viewvc?view=rev&rev=531472
Log:
Test didnt work on Unix. Assume that ${user.home} is in a partition with some (but
finite) space. If anyone runs these tests on a disk array with >1 petabyte,
they will still fail.
Modified:
ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
Modified:
ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml?view=diff&rev=531472&r1=531471&r2=531472
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
(original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
Mon Apr 23 07:11:46 2007
@@ -2,29 +2,32 @@
<project name="hasfreespace-test" default="all" basedir="."
xmlns:au="antlib:org.apache.ant.antunit">
<available property="jdk6.available" classname="java.util.ServiceLoader"/>
-
+
+ <property name="partition" value="${user.home}" />
+
+
<target name="test-not-enough-space-human" if="jdk6.available">
<au:assertFalse>
- <hasfreespace partition="c:" needed="1P"/>
+ <hasfreespace partition="${partition}" needed="1P"/>
</au:assertFalse>
</target>
<target name="test-enough-space-human" if="jdk6.available">
<au:assertTrue>
- <hasfreespace partition="c:" needed="1K"/>
+ <hasfreespace partition="${partition}" needed="1K"/>
</au:assertTrue>
</target>
<target name="test-not-enough-space" if="jdk6.available">
<property name="long.max-value" value="9223372036854775807"/>
<au:assertFalse>
- <hasfreespace partition="c:" needed="${long.max-value}"/>
+ <hasfreespace partition="${partition}" needed="${long.max-value}"/>
</au:assertFalse>
</target>
<target name="test-enough-space" if="jdk6.available">
<au:assertTrue>
- <hasfreespace partition="c:" needed="1"/>
+ <hasfreespace partition="${partition}" needed="1"/>
</au:assertTrue>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]