ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r691949 - /ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
Date Thu, 04 Sep 2008 09:26:21 GMT
Author: bodewig
Date: Thu Sep  4 02:26:19 2008
New Revision: 691949

URL: http://svn.apache.org/viewvc?rev=691949&view=rev
Log:
initial tests for dirscanner behavior and symlinks

Added:
    ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml   (with props)

Added: 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=691949&view=auto
==============================================================================
--- ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml (added)
+++ ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml Thu Sep  4 02:26:19
2008
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns:au="antlib:org.apache.ant.antunit" default="antunit">
+
+  <import file="../antunit-base.xml"/>
+
+  <target name="setUp">
+    <property name="base" location="${input}/base"/>
+    <mkdir dir="${base}"/>
+  </target>
+
+  <target name="checkOs">
+    <condition property="unix"><os family="unix"/></condition>
+  </target>
+
+  <target name="YtestSymlinkToSiblingFollow"
+          depends="checkOs, setUp, -sibling"
+          if="unix">
+    <copy todir="${output}" followSymlinks="true">
+      <fileset dir="${base}"/>
+    </copy>
+    <au:assertFileExists file="${output}/B/file.txt"/>
+  </target>
+
+  <target name="YtestSymlinkToSiblingNoFollow"
+          depends="checkOs, setUp, -sibling"
+          if="unix">
+    <copy todir="${output}" followSymlinks="false">
+      <fileset dir="${base}"/>
+    </copy>
+    <au:assertFileDoesntExist file="${output}/B/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>
+    
+</project>

Propchange: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message