forked from phingofficial/phing
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add type to $excl parameter to fix type error
This should fix phingofficial#1890
- Loading branch information
Showing
5 changed files
with
121 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="CopyTaskTest" default="main"> | ||
<property name="tmp.dir" value="tmp"/> | ||
|
||
<fileset dir="vendor" id="vendor"> | ||
<include name="*"/> | ||
</fileset> | ||
|
||
<target name="setup"> | ||
<mkdir dir="${tmp.dir}"/> | ||
</target> | ||
|
||
<target name="clean"> | ||
<delete dir="${tmp.dir}"/> | ||
</target> | ||
|
||
<target name="testCopyDanglingSymlink"> | ||
<mkdir dir="${tmp.dir}/base"/> | ||
<symlink target="${tmp.dir}/base/all" link="${tmp.dir}/base/dangling_symlink"/> | ||
|
||
<copy todir="${tmp.dir}/new"> | ||
<fileset dir="${tmp.dir}/base"> | ||
<include name="*"/> | ||
</fileset> | ||
</copy> | ||
|
||
<delete dir="${tmp.dir}/base"/> | ||
<delete dir="${tmp.dir}/new"/> | ||
</target> | ||
|
||
<target name="testCopySymlinkPreserveLastModifiedShouldCopyTarget"> | ||
<mkdir dir="${tmp.dir}/base"/> | ||
<mkdir dir="${tmp.dir}/new"/> | ||
<echo file="${tmp.dir}/base/x" message="Testmessage"/> | ||
<symlink target="x" link="${tmp.dir}/base/y"/> | ||
|
||
<copy todir="${tmp.dir}/new" preserveLastModified="true"> | ||
<filelist dir="${tmp.dir}/base" files="y,x"/> | ||
</copy> | ||
|
||
<filesize file="${tmp.dir}/new/x" propertyname="test.filesize"/> | ||
|
||
<delete dir="${tmp.dir}/base"/> | ||
<delete dir="${tmp.dir}/new"/> | ||
</target> | ||
|
||
<target name="testCopyFileList"> | ||
<touch file="${tmp.dir}/Test1"/> | ||
<touch file="${tmp.dir}/Test2"/> | ||
<mkdir dir="copies"/> | ||
<copy todir="copies"> | ||
<filelist dir="${tmp.dir}" files="Test1,Test2"/> | ||
</copy> | ||
<delete dir="copies"/> | ||
</target> | ||
|
||
<target name="testCopyDirSet"> | ||
<mkdir dir="${tmp.dir}/Test1"/> | ||
<mkdir dir="${tmp.dir}/Test2"/> | ||
<touch file="${tmp.dir}/Test1/a"/> | ||
<touch file="${tmp.dir}/Test2/b"/> | ||
<mkdir dir="copies"/> | ||
<copy todir="copies" verbose="true"> | ||
<dirset dir="${tmp.dir}"> | ||
<include name="Test*"/> | ||
</dirset> | ||
</copy> | ||
<delete dir="copies"/> | ||
</target> | ||
|
||
<target name="testOverwriteExistingSymlink"> | ||
<symlink target="${tmp.dir}/target-a" link="${tmp.dir}/link-a"/> | ||
<symlink target="${tmp.dir}/target-b" link="${tmp.dir}/link-b"/> | ||
<copy file="${tmp.dir}/link-a" tofile="${tmp.dir}/link-b" overwrite="true"/> | ||
</target> | ||
|
||
<target name="testGranularity" description="do not overwrite existing file without touching it first"> | ||
<touch mkdirs="true" file="${tmp.dir}/copysrcs/Test" datetime="-1 day"/> | ||
<touch mkdirs="true" file="${tmp.dir}/copydest/Test" datetime="-1 year"/> | ||
<copy file="${tmp.dir}/copysrcs/Test" todir="${tmp.dir}/copydest" granularity="999999999" overwrite="false"/> | ||
</target> | ||
|
||
<target name="testFilesetFiles" description="test fileset include and excludes files"> | ||
<touch mkdirs="true" file="${tmp.dir}/source/Foo/Foo.php"/> | ||
<touch mkdirs="true" file="${tmp.dir}/source/Foo/FooTest.php"/> | ||
<touch mkdirs="true" file="${tmp.dir}/source/Bar/Bar.php"/> | ||
<touch mkdirs="true" file="${tmp.dir}/source/Bar/BarTest.php"/> | ||
<touch mkdirs="true" file="${tmp.dir}/source/Baz/Baz.php"/> | ||
<touch mkdirs="true" file="${tmp.dir}/source/Baz/BazTest.php"/> | ||
<touch mkdirs="true" file="${tmp.dir}/source/Qux/Qux.php"/> | ||
<touch mkdirs="true" file="${tmp.dir}/source/Qux/QuxTest.php"/> | ||
<mkdir dir="${tmp.dir}/destination"/> | ||
<copy haltonerror="true" todir="${tmp.dir}/destination"> | ||
<fileset dir="${tmp.dir}/source" | ||
includesfile="includes.txt" | ||
excludesfile="excludes.txt"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="main"/> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*Test.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*.php |