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 2008/09/04 12:02:00 UTC

svn commit: r691955 - /ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

Author: bodewig
Date: Thu Sep  4 03:02:00 2008
New Revision: 691955

URL: http://svn.apache.org/viewvc?rev=691955&view=rev
Log:
tests for a basedir that is a symlink itself

Modified:
    ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

Modified: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml?rev=691955&r1=691954&r2=691955&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml Thu Sep  4 03:02:00 2008
@@ -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>