Author: bodewig
Date: Mon Oct 6 05:44:29 2008
New Revision: 702138
URL: http://svn.apache.org/viewvc?rev=702138&view=rev
Log:
(disabled) tests for PR 45944
Added:
ant/core/trunk/src/tests/antunit/taskdefs/copy-test.xml (with props)
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java?rev=702138&r1=702137&r2=702138&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java Mon Oct 6
05:44:29 2008
@@ -567,8 +567,10 @@
}
}
}
+
private void iterateOverBaseDirs(
HashSet baseDirs, HashMap dirsByBasedir, HashMap filesByBasedir) {
+
Iterator iter = baseDirs.iterator();
while (iter.hasNext()) {
File f = (File) iter.next();
Added: ant/core/trunk/src/tests/antunit/taskdefs/copy-test.xml
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/copy-test.xml?rev=702138&view=auto
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/copy-test.xml (added)
+++ ant/core/trunk/src/tests/antunit/taskdefs/copy-test.xml Mon Oct 6 05:44:29
2008
@@ -0,0 +1,63 @@
+<?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 default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
+ <import file="../antunit-base.xml" />
+
+ <target name="-fileResourceSetup">
+ <mkdir dir="${input}"/>
+ <mkdir dir="${output}"/>
+ <touch file="${input}/file.txt"/>
+ </target>
+
+ <target name="xtestCopyFile" depends="-fileResourceSetup">
+ <au:assertFileDoesntExist file="${output}/file.txt"/>
+ <copy todir="${output}">
+ <file file="${input}/file.txt"/>
+ </copy>
+ <au:assertFileExists file="${output}/file.txt"/>
+ </target>
+
+ <target name="xtestCopyFileInResources" depends="-fileResourceSetup">
+ <au:assertFileDoesntExist file="${output}/file.txt"/>
+ <copy todir="${output}">
+ <resources>
+ <file file="${input}/file.txt"/>
+ </resources>
+ </copy>
+ <au:assertFileExists file="${output}/file.txt"/>
+ </target>
+
+ <target name="testCopyFileFlatten" depends="-fileResourceSetup">
+ <au:assertFileDoesntExist file="${output}/file.txt"/>
+ <copy todir="${output}" flatten="true">
+ <file file="${input}/file.txt"/>
+ </copy>
+ <au:assertFileExists file="${output}/file.txt"/>
+ </target>
+
+ <target name="testCopyFileInResourcesFlatten" depends="-fileResourceSetup">
+ <au:assertFileDoesntExist file="${output}/file.txt"/>
+ <copy todir="${output}" flatten="true">
+ <resources>
+ <file file="${input}/file.txt"/>
+ </resources>
+ </copy>
+ <au:assertFileExists file="${output}/file.txt"/>
+ </target>
+
+</project>
Propchange: ant/core/trunk/src/tests/antunit/taskdefs/copy-test.xml
------------------------------------------------------------------------------
svn:eol-style = native