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 2016/04/17 06:41:20 UTC
ant git commit: try running the symlink condition tests on windows as
well
Repository: ant
Updated Branches:
refs/heads/master 32e3ed022 -> abdaa5845
try running the symlink condition tests on windows as well
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/abdaa584
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/abdaa584
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/abdaa584
Branch: refs/heads/master
Commit: abdaa584530f4020f45162dce5d9b5d01b6751c0
Parents: 32e3ed0
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sun Apr 17 06:40:35 2016 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sun Apr 17 06:40:58 2016 +0200
----------------------------------------------------------------------
src/tests/antunit/types/selectors/symlink-test.xml | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/abdaa584/src/tests/antunit/types/selectors/symlink-test.xml
----------------------------------------------------------------------
diff --git a/src/tests/antunit/types/selectors/symlink-test.xml b/src/tests/antunit/types/selectors/symlink-test.xml
index 0c47326..cb257ac 100644
--- a/src/tests/antunit/types/selectors/symlink-test.xml
+++ b/src/tests/antunit/types/selectors/symlink-test.xml
@@ -25,13 +25,16 @@
<condition property="unix">
<os family="unix"/>
</condition>
+ <condition property="windows">
+ <os family="windows"/>
+ </condition>
<target name="createTestdir">
<mkdir dir="${output}"/>
<touch file="${output}/${file}"/>
</target>
- <target name="testSymlink" depends="makeSymlink" if="unix">
+ <target name="testSymlink" depends="makeSymlink">
<au:assertTrue>
<resourcecount when="equal" count="1">
<fileset dir="${output}">
@@ -53,8 +56,11 @@
<target name="makeSymlink-Unix" if="unix">
<symlink link="${output}/${link}" resource="${output}/${file}"/>
</target>
- <target name="makeSymlink-Windows" unless="unix">
- <!-- no idea how to do this -->
+ <target name="makeSymlink-Windows" if="windows">
+ <exec executable="mklink">
+ <arg file="${output}/${link}"/>
+ <arg file="${output}/${file}"/>
+ </exec>
</target>
<target name="testNoSymlink" depends="createTestdir">
@@ -75,7 +81,7 @@
</au:assertFalse>
</target>
- <target name="testAsTrueConditions" depends="makeSymlink" if="unix">
+ <target name="testAsTrueConditions" depends="makeSymlink">
<au:assertTrue>
<isfileselected file="${output}/${link}">
<symlink/>