Browse Source

tests for a basedir that is a symlink itself

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@691955 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 17 years ago
parent
commit
71caca1540
1 changed files with 25 additions and 1 deletions
  1. +25
    -1
      src/tests/antunit/core/dirscanner-symlinks-test.xml

+ 25
- 1
src/tests/antunit/core/dirscanner-symlinks-test.xml View File

@@ -46,10 +46,34 @@
<au:assertFileDoesntExist file="${output}/B/file.txt"/>
</target>

<target name="testBasedirIsSymlinkFollow"
depends="checkOs, setUp, -basedir-as-symlink"
if="unix">
<copy todir="${output}">
<fileset dir="${base}" followsymlinks="true"/>
</copy>
<au:assertFileExists file="${output}/file.txt"/>
</target>

<target name="FAILStestBasedirIsSymlinkNoFollow"
depends="checkOs, setUp, -basedir-as-symlink"
if="unix">
<copy todir="${output}">
<fileset dir="${base}" followsymlinks="false"/>
</copy>
<au:assertFileDoesntExist file="${output}/file.txt"/>
</target>

<target name="-sibling" if="unix">
<mkdir dir="${base}/A"/>
<touch file="${base}/A/file.txt"/>
<symlink link="${base}/B" resource="${base}/A"/>
</target>

<target name="-basedir-as-symlink" if="unix">
<delete dir="${base}"/>
<mkdir dir="${input}/realdir"/>
<touch file="${input}/realdir/file.txt"/>
<symlink link="${base}" resource="${input}/realdir"/>
</target>
</project>

Loading…
Cancel
Save