diff options
Diffstat (limited to 'framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types')
44 files changed, 0 insertions, 4813 deletions
diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/build-embedded-ref.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/build-embedded-ref.xml deleted file mode 100644 index f2cbd2ad..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/build-embedded-ref.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?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="all"> - <target name="all"/> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/conditions/isreference-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/conditions/isreference-test.xml deleted file mode 100644 index 8929e901..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/conditions/isreference-test.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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 name="isreference-test" default="antunit" - xmlns:au="antlib:org.apache.ant.antunit"> - - <import file="../../antunit-base.xml" /> - - <target name="out-of-band"> - <path id="out-of-band" path="."/> - </target> - - <target name="testOutOfBand"> - <au:assertFalse> - <isreference refid="out-of-band"/> - </au:assertFalse> - </target> - - <target name="testInBand"> - <path id="in-band" path="."/> - <au:assertTrue> - <isreference refid="in-band"/> - </au:assertTrue> - </target> -</project> - diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/conditions/matches-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/conditions/matches-test.xml deleted file mode 100644 index 5d174613..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/conditions/matches-test.xml +++ /dev/null @@ -1,114 +0,0 @@ -<?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"> - <!-- NB: ant's interface to JDK14 regex enables UNIX_LINES --> - <property name="NL" value=" "/> - <regexp id="myid" pattern="^[a-z]{3,4}$"/> - - <available property="jdk1.4+" classname="java.lang.CharSequence"/> - <condition property="some.regexp.support"> - <or> - <isset property="jdk1.4+"/> - <isset property="apache.regexp.present"/> - <isset property="apache.oro.present"/> - </or> - </condition> - - <target name="test-refid" if="some.regexp.support"> - <au:assertTrue> - <matches string="abc"> - <regexp refid="myid"/> - </matches> - </au:assertTrue> - </target> - - <target name="test-simple" if="some.regexp.support"> - <au:assertTrue> - <matches string="abc" pattern="^[a-z]{3,4}$"/> - </au:assertTrue> - </target> - - <target name="test-nomatch" if="some.regexp.support"> - <au:assertFalse> - <matches string="abc" pattern="^b.*" /> - </au:assertFalse> - </target> - - <target name="test-date" if="some.regexp.support"> - <tstamp> - <format property="today" pattern="dd-MM-yyyy" locale="en"/> - </tstamp> - <au:assertTrue> - <matches string="${today}"> - <regexp pattern="^[0123]\d-[01]\d-[12]\d\d\d$" /> - </matches> - </au:assertTrue> - </target> - - <target name="test-abc" if="some.regexp.support"> - <au:assertTrue> - <matches string="abc" pattern="ab?"/> - </au:assertTrue> - <au:assertTrue> - <matches string="abc" pattern="ab."/> - </au:assertTrue> - <au:assertTrue> - <matches string="ab" pattern="ab?"/> - </au:assertTrue> - <au:assertTrue> - <matches string="ab" pattern="ab"/> - </au:assertTrue> - <au:assertTrue> - <matches string="acb" pattern="ab?"/> - </au:assertTrue> - <au:assertFalse> - <matches string="acb" pattern="ab."/> - </au:assertFalse> - </target> - - <target name="test-caseinsensitive" if="some.regexp.support"> - <au:assertTrue> - <matches string="ABC" pattern="ab?" casesensitive="false"/> - </au:assertTrue> - </target> - - <target name="test-singleline" if="some.regexp.support"> - <au:assertTrue> - <matches string="AB${line.separator}C" pattern="^ab.*C$" - casesensitive="false" - singleline="true"/> - </au:assertTrue> - <au:assertFalse> - <matches string="AB${line.separator}C" pattern="^ab.*C$" - casesensitive="false" - singleline="false"/> - </au:assertFalse> - </target> - - <target name="test-multiline" if="some.regexp.support"> - <au:assertTrue> - <matches string="AB${NL}C" pattern="^C$" - multiline="true"/> - </au:assertTrue> - <au:assertTrue> - <matches string="AB${NL}C" pattern="^AB$" - multiline="true"/> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/cutdirs-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/cutdirs-test.xml deleted file mode 100644 index 64f0652b..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/cutdirs-test.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?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" - name="firstmatch-test" - default="antunit"> - - <import file="../antunit-base.xml" /> - - <target name="setUp"> - <mkdir dir="${input}"/> - <mkdir dir="${output}"/> - </target> - - <target name="testCut" depends="setUp"> - <mkdir dir="${input}/a/b/c"/> - <touch file="${input}/a/b/D"/> - <touch file="${input}/a/b/c/E"/> - <copy todir="${output}"> - <fileset dir="${input}"/> - <cutdirsmapper dirs="2"/> - </copy> - <au:assertFileExists file="${output}/D"/> - <au:assertFileExists file="${output}/c/E"/> - </target> - - <target name="testCutTooManyLevels" depends="setUp"> - <mkdir dir="${input}/a/b/c"/> - <touch file="${input}/a/b/D"/> - <touch file="${input}/a/b/c/E"/> - <copy todir="${output}"> - <fileset dir="${input}"/> - <cutdirsmapper dirs="5"/> - </copy> - <au:assertTrue> - <resourcecount count="0"> - <fileset dir="${output}"/> - </resourcecount> - </au:assertTrue> - </target> - -</project>
\ No newline at end of file diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/defer-reference-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/defer-reference-test.xml deleted file mode 100644 index a67ad3b7..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/defer-reference-test.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?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="all" xmlns:au="antlib:org.apache.ant.antunit"> - <target name="notcalled"> - <filelist id="ref1" dir="${basedir}" files="xxx" /> - </target> - - <target name="test-macrodef-embedded-ref"> - <!-- bug 34458 --> - <macrodef name="foo"> - <element name="nested" implicit="yes" optional="yes"/> - <sequential> - <fileset id="abc" dir="."> - <nested/> - </fileset> - </sequential> - </macrodef> - - <ant antfile="build-embedded-ref.xml" inheritRefs="true"/> - </target> - - <condition property="allow.script"> - <and> - <available classname="org.apache.bsf.BSFManager" /> - <available classname="bsh.StringUtil" /> - </and> - </condition> - - <target name="test-script" if="allow.script"> - <!-- bugzilla: 37688 --> - <macrodef name="compileMapper" > - <attribute name="objDir" /> - <attribute name="id" default="compileMapperID" /> - <sequential> - <mkdir dir="@{objDir}"/> - <mapper id="@{id}"> - <chainedmapper > - <flattenmapper/> - <globmapper from="*" to="@{objDir}/*.o"/> - </chainedmapper> - </mapper> - </sequential> - </macrodef> - <script language="beanshell"/> - </target> - - <target name="all"> - <au:antunit> - <fileset file="${ant.file}"/> - <au:plainlistener/> - </au:antunit> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/fileset-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/fileset-test.xml deleted file mode 100644 index 9580a1ce..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/fileset-test.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?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="test-fileset-missing-dir"> - <path id="missing.path.id"> - <fileset id="missing.dir.fs" dir="not present" - erroronmissingdir="false"/> - </path> - <au:assertTrue> - <and> - <equals arg1="" arg2="${toString:missing.path.id}"/> - <resourcecount count="0" refid="missing.dir.fs" /> - </and> - </au:assertTrue> - </target> - - <target name="test-fileset-missing-dir-exception"> - <mkdir dir="${output}"/> - <au:expectfailure expectedmessage="not present does not exist"> - <copy todir="${output}"> - <fileset dir="not present" /> - </copy> - </au:expectfailure> - </target> - - <target name="test-fileset-with-if"> - <fileset id="this.xml" dir="."> - <include if="trigger.include" name="fileset-test.xml"/> - </fileset> - <pathconvert refid="this.xml" property="this.xml.prop" pathsep="${line.separator}" setonempty="false"/> - <au:assertTrue message="fileset this.xml should not contain anything but contains ${this.xml.prop}"> - <not> - <isset property="this.xml.prop"/> - </not> - </au:assertTrue> - </target> - - <target name="test-fileset-with-if-property-set"> - <property name="trigger.include" value="true"/> - <fileset id="this.xml" dir="."> - <include if="trigger.include" name="fileset-test.xml"/> - </fileset> - <pathconvert refid="this.xml" property="this.xml.prop" pathsep="${line.separator}" setonempty="false"/> - <au:assertPropertySet name="this.xml.prop" message="fileset should contain one file"/> - <echo>${this.xml.prop}</echo> - <au:assertLogContains text="fileset-test.xml"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/filterset-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/filterset-test.xml deleted file mode 100644 index f1654f6d..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/filterset-test.xml +++ /dev/null @@ -1,96 +0,0 @@ -<?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" /> - - <property name="br" value="${line.separator}" /> - - <target name="testRecursionRegression"> - <mkdir dir="${output}"/> - <copy todir="${output}"> - <string value="@a@${br}@b@${br}@c@${br}@d@${br}" /> - <mergemapper to="filterset-output.txt" /> - <filterset> - <filter token="a" value="aaa" /> - <filter token="b" value="bbb" /> - <filter token="c" value="@a@:@b@" /> - <filter token="d" value="@c@:@c@" /> - </filterset> - </copy> - - <loadfile property="afterfiltering" srcFile="${output}/filterset-output.txt"/> - - <au:assertEquals - expected="aaa${br}bbb${br}aaa:bbb${br}aaa:bbb:aaa:bbb${br}" - actual="${afterfiltering}"/> - </target> - - <!-- https://issues.apache.org/bugzilla/show_bug.cgi?id=45094 --> - <target name="testOverlappingMulticharToken"> - <mkdir dir="${output}"/> - <copy todir="${output}"> - <string value="@@USER@@@@@HOST@@" /> - <mergemapper to="filterset-output.txt" /> - <filterset begintoken="@@" endtoken="@@"> - <filter token="USER" value="user" /> - <filter token="HOST" value="host" /> - </filterset> - </copy> - - <loadfile property="afterfiltering" srcFile="${output}/filterset-output.txt"/> - - <au:assertEquals - expected="user@host" - actual="${afterfiltering}"/> - </target> - - <target name="testNestedPropertySet"> - <mkdir dir="${output}"/> - <mkdir dir="${input}"/> - <echo file="${input}/src.txt"> -Filter with property set test -@foo.x@ - should change -@foo.y@ - should change -@bar.x@ - should not change -@cccc@ - should not change - </echo> - <echo file="${output}/expected.txt"> -Filter with property set test -1111 - should change -2222 - should change -@bar.x@ - should not change -@cccc@ - should not change - </echo> - <property name="foo.x" value="1111" /> - <property name="foo.y" value="2222" /> - <copy todir="${output}"> - <fileset dir="${input}"/> - <filterset> - <propertyset> - <propertyref prefix="foo." /> - </propertyset> - </filterset> - </copy> - <au:assertFilesMatch - actual="${output}/src.txt" - expected="${output}/expected.txt" - /> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/firstmatch-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/firstmatch-test.xml deleted file mode 100644 index 68c332b2..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/firstmatch-test.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?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" - name="firstmatch-test" - default="antunit"> - - <import file="../antunit-base.xml" /> - - <target name="testMatch"> - <mkdir dir="${input}"/> - <touch file="${input}/A"/> - <touch file="${input}/B"/> - <mkdir dir="${output}"/> - <copy todir="${output}" enablemultiplemappings="true"> - <fileset dir="${input}"/> - <firstmatchmapper> - <globmapper from="A" to="A.txt"/> - <identitymapper/> - </firstmatchmapper> - </copy> - <au:assertFileExists file="${output}/A.txt"/> - <au:assertFileExists file="${output}/B"/> - <au:assertFileDoesntExist file="${output}/A"/> - <au:assertFileDoesntExist file="${output}/B.txt"/> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/javaresource-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/javaresource-test.xml deleted file mode 100644 index d0e99e00..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/javaresource-test.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?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="setUp"> - <mkdir dir="${resources}"/> - <echo file="${resources}/foo.txt">Hello, world</echo> - <echo file="${resources}/x.properties">a=b</echo> - </target> - - <target name="testReadFromFile" depends="setUp"> - <concat> - <javaresource name="foo.txt"> - <classpath location="${resources}"/> - </javaresource> - </concat> - <au:assertLogContains text="Hello, world"/> - <loadproperties> - <javaresource name="x.properties"> - <classpath location="${resources}"/> - </javaresource> - </loadproperties> - <au:assertPropertyEquals name="a" value="b"/> - </target> - - <target name="testReadFromJar" depends="setUp"> - <jar destfile="${test.jar}"> - <fileset dir="${resources}"/> - </jar> - <delete dir="${resources}"/> - <concat> - <javaresource name="foo.txt"> - <classpath location="${test.jar}"/> - </javaresource> - </concat> - <au:assertLogContains text="Hello, world"/> - <loadproperties> - <javaresource name="x.properties"> - <classpath location="${test.jar}"/> - </javaresource> - </loadproperties> - <au:assertPropertyEquals name="a" value="b"/> - </target> -</project> - - diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mapper-ref.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mapper-ref.xml deleted file mode 100644 index 3ada7f3b..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mapper-ref.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?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. ---> -<!-- does not address/replace the circular reference checks, etc. - in MapperTest.java (yet). - --> - -<project xmlns:au="antlib:org.apache.ant.antunit"> - <macrodef name="test"> - <sequential> - <pathconvert property="dest"> - <string value="foo" /> - <mapper refid="mapper" /> - </pathconvert> - <au:assertTrue> - <equals arg1="${dest}" arg2="bar" /> - </au:assertTrue> - </sequential> - </macrodef> - - <target name="testBasic" description="success"> - <mapper id="mapper" type="merge" to="bar" /> - <test /> - </target> - - <target name="testFileNameMapper" description="success"> - <mergemapper id="mapper" to="bar" /> - <test /> - </target> - - <target name="testWrongType" description="failure"> - <path id="mapper" path="whocares" /> - <au:expectfailure - expectedMessage="org.apache.tools.ant.types.Path at reference 'mapper' is not a valid mapper reference."> - <test /> - </au:expectfailure> - </target> - - <target name="all" depends="testBasic,testFileNameMapper,testWrongType" /> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mappers/glob-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mappers/glob-test.xml deleted file mode 100644 index c4d92da2..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mappers/glob-test.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?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. ---> -<!-- A test for bugzilla 44731 --> -<project xmlns:au="antlib:org.apache.ant.antunit" - name="glob-test" - default="antunit"> - - <import file="../../antunit-base.xml" /> - - <target name="setUp"> - <mkdir dir="${input}"/> - <mkdir dir="${output}"/> - </target> - - <target name="test-overlapping-patterns" depends="setUp"> - <!-- shouldn't be moved because pre- and postfix of from pattern - overlap --> - <touch file="${input}/foobar-1.2.3.jar"/> - - <touch file="${input}/foobar-janfu-1.2.3.jar"/> - <touch file="${input}/foobar--1.2.3.jar"/> - <touch file="${input}/foobar-x-1.2.3.jar"/> - <move todir="${output}"> - <fileset dir="${input}"> - <include name="**/*.jar"/> - </fileset> - <mapper type="glob" from="foobar-*-1.2.3.jar" to="*.jar"/> - </move> - <au:assertFileExists file="${input}/foobar-1.2.3.jar"/> - <au:assertFileExists file="${output}/janfu.jar"/> - <au:assertFileExists file="${output}/.jar"/> - <au:assertFileExists file="${output}/x.jar"/> - </target> - - <target name="test-no-*-in-to" depends="setUp" - description="https://issues.apache.org/bugzilla/show_bug.cgi?id=46506"> - <touch file="${input}/a-b.jar"/> - <copy todir="${output}"> - <fileset dir="${input}"/> - <mapper type="glob" from="a*.jar" to="c.jar"/> - </copy> - <au:assertFileDoesntExist file="${output}/c.jar-b"/> - <au:assertFileExists file="${output}/c.jar"/> - </target> - - <target name="test-*-at-end-of-to" depends="setUp"> - <touch file="${input}/a-b.jar"/> - <copy todir="${output}"> - <fileset dir="${input}"/> - <mapper type="glob" from="a*.jar" to="c.jar*"/> - </copy> - <au:assertFileDoesntExist file="${output}/c.jar"/> - <au:assertFileExists file="${output}/c.jar-b"/> - </target> - - <target name="test-no-*-in-from" depends="setUp"> - <touch file="${input}/a-b.jar"/> - <copy todir="${output}"> - <fileset dir="${input}"/> - <mapper type="glob" from="a-b" to="c.jar"/> - </copy> - <au:assertFileDoesntExist file="${output}/c.jar"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mappers/packagemapper-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mappers/packagemapper-test.xml deleted file mode 100644 index cad01464..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/mappers/packagemapper-test.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?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="testHandleDirSep" - description="https://issues.apache.org/bugzilla/show_bug.cgi?id=51086"> - <pathconvert property="p1"> - <string>foo/bar</string> - <packagemapper from="*" to="*" handledirsep="true"/> - </pathconvert> - <au:assertPropertyEquals name="p1" value="foo.bar"/> - <pathconvert property="p2"> - <string>foo\bar</string> - <packagemapper from="*" to="*" handledirsep="true"/> - </pathconvert> - <au:assertPropertyEquals name="p2" value="foo.bar"/> - </target> - - <target name="testMapsOnlySubstring" - description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53399"> - <pathconvert property="p1"> - <string>xyzzy${file.separator}foo${file.separator}bar</string> - <packagemapper from="xyzzy${file.separator}*" to="*" handledirsep="false"/> - </pathconvert> - <au:assertPropertyEquals name="p1" value="foo.bar"/> - <pathconvert property="p2"> - <string>xyzzy${file.separator}foo${file.separator}bar</string> - <packagemapper from="xyzzy/*" to="*" handledirsep="true"/> - </pathconvert> - <au:assertPropertyEquals name="p2" value="foo.bar"/> - </target> -</project>
\ No newline at end of file diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/modified-selector-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/modified-selector-test.xml deleted file mode 100644 index 16688ca9..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/modified-selector-test.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?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="test-one-file"> - <delete dir="${output}"/> - <mkdir dir="${output}"/> - <copy todir="${output}" overwrite="yes"> - <fileset dir="." includes="modified-selector-test.xml"> - <modified update="true"> - <param name="cache.cachefile" value="${output}/cc.properties"/> - </modified> - </fileset> - </copy> - - <au:assertTrue> - <available file="${output}/cc.properties"/> - </au:assertTrue> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/path-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/path-test.xml deleted file mode 100644 index 4f4be9ab..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/path-test.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?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" /> - - <property name="existingFile" value="${basedir}/build.xml" /> - - <files id="files"> - <include name="${existingFile}" /> - </files> - - <target name="test-directUse" description="Bug 42397 - works fine"> - <path id="path"> - <files> - <include name="${existingFile}" /> - </files> - </path> - </target> - - <target name="test-refid" description="Bug 42397"> - <path id="path"> - <files refid="files" /> - </path> - </target> - - <target name="test-wildcard" - description="https://issues.apache.org/bugzilla/show_bug.cgi?id=46842"> - <path id="with-wildcard"> - <pathelement location="*"/> - </path> - <au:assertEquals expected="${basedir}${file.separator}*" - actual="${toString:with-wildcard}"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/patternset-invert-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/patternset-invert-test.xml deleted file mode 100644 index 7c0912e7..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/patternset-invert-test.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?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="all" xmlns:au="antlib:org.apache.ant.antunit"> - - <macrodef name="test"> - <sequential> - <au:assertTrue> - <resourcecount count="0"> - <intersect> - <fileset dir="${basedir}"> - <patternset refid="plus" /> - </fileset> - <fileset dir="${basedir}"> - <patternset refid="minus" /> - </fileset> - </intersect> - </resourcecount> - </au:assertTrue> - </sequential> - </macrodef> - - <target name="testInvertNested"> - <basename property="basename" file="${ant.file}" /> - <echo>$${basename}=${basename}</echo> - <patternset id="plus" includes="${basename}" /> - <patternset id="minus"> - <invert> - <patternset refid="plus" /> - </invert> - </patternset> - <test /> - </target> - - <target name="testInvertRefid"> - <basename property="basename" file="${ant.file}" /> - <echo>$${basename}=${basename}</echo> - <patternset id="plus" includes="${basename}" /> - <patternset id="minus"> - <invert refid="plus" /> - </patternset> - <test /> - </target> - - <target name="all"> - <au:antunit> - <fileset file="${ant.file}"/> - <au:plainlistener /> - </au:antunit> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/patternset-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/patternset-test.xml deleted file mode 100644 index 60690d49..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/patternset-test.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?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"> - <mkdir dir="${input}"/> - <touch file="${input}/A"/> - <touch file="${input}/B"/> - <touch file="${input}/C"/> - <touch file="${input}/D"/> - <mkdir dir="${output}"/> - <macrodef name="cp"> - <sequential> - <copy todir="${output}"> - <fileset dir="${input}"> - <include name="A" if="${if}"/> - <include name="B" unless="${if}"/> - <include name="C" if="if"/> - <include name="D" unless="if"/> - </fileset> - </copy> - </sequential> - </macrodef> - </target> - - <target name="testIfNotSet" depends="setUp"> - <cp/> - <au:assertFileDoesntExist file="${output}/A"/> - <au:assertFileExists file="${output}/B"/> - <au:assertFileDoesntExist file="${output}/C"/> - <au:assertFileExists file="${output}/D"/> - </target> - - <target name="testIfSet" depends="setUp"> - <property name="if" value="whatever"/> - <cp/> - <au:assertFileDoesntExist file="${output}/A"/> - <au:assertFileExists file="${output}/B"/> - <au:assertFileExists file="${output}/C"/> - <au:assertFileDoesntExist file="${output}/D"/> - </target> - - <target name="testIfTrue" depends="setUp"> - <property name="if" value="true"/> - <cp/> - <au:assertFileExists file="${output}/A"/> - <au:assertFileDoesntExist file="${output}/B"/> - <au:assertFileExists file="${output}/C"/> - <au:assertFileDoesntExist file="${output}/D"/> - </target> - - <target name="testIfFalse" depends="setUp"> - <property name="if" value="false"/> - <cp/> - <au:assertFileDoesntExist file="${output}/A"/> - <au:assertFileExists file="${output}/B"/> - <au:assertFileExists file="${output}/C"/> - <au:assertFileDoesntExist file="${output}/D"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/propertyset-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/propertyset-test.xml deleted file mode 100644 index 0b7e236c..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/propertyset-test.xml +++ /dev/null @@ -1,125 +0,0 @@ -<?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 name="test-propertyset" basedir="." default="antunit" - xmlns:au="antlib:org.apache.ant.antunit"> - - <import file="../antunit-base.xml" /> - - <property name="fooA" value="FooA"/> - <property name="barB" value="BarB"/> - - <propertyset id="properties-starting-with-foo"> - <propertyref prefix="foo"/> - </propertyset> - <propertyset id="properties-starting-with-bar"> - <propertyref prefix="bar"/> - </propertyset> - <propertyset id="my-set"> - <propertyset refid="properties-starting-with-foo"/> - <propertyset refid="properties-starting-with-bar"/> - </propertyset> - - <macrodef name="expect.equals"> - <attribute name="test"/> - <attribute name="exp"/> - <attribute name="got"/> - <sequential> - <fail message= - "@{test} failed: expected "@{exp}" got "@{got}""> - <condition> - <not> - <equals arg1="@{exp}" arg2="@{got}"/> - </not> - </condition> - </fail> - </sequential> - </macrodef> - - <target name="test-reference-to-two-references"> - <expect.equals - test="reference to two references" - exp="barB=BarB, fooA=FooA" - got="${toString:my-set}"/> - </target> - - <target name="test-nested-mapped"> - <propertyset id="nested-mapped"> - <propertyset> - <propertyset refid="properties-starting-with-foo"/> - <globmapper from="foo*" to="boo*" /> - </propertyset> - <propertyset> - <propertyset refid="properties-starting-with-bar"/> - <globmapper from="bar*" to="far*" /> - </propertyset> - </propertyset> - <expect.equals - test="nested mapped propertysets" - exp="booA=FooA, farB=BarB" - got="${toString:nested-mapped}"/> - </target> - - <target name="test-nested-mapped-mapped"> - <propertyset id="nested-mapped-mapped"> - <propertyset> - <propertyset refid="properties-starting-with-foo"/> - <globmapper from="foo*" to="boo*" /> - </propertyset> - <propertyset> - <propertyset refid="properties-starting-with-bar"/> - <globmapper from="bar*" to="far*" /> - </propertyset> - <mapper> - <globmapper from="boo*" to="hoo*" /> - <globmapper from="far*" to="near*" /> - </mapper> - </propertyset> - <expect.equals - test="nested mapped propertysets" - exp="hooA=FooA, nearB=BarB" - got="${toString:nested-mapped-mapped}"/> - </target> - - <target name="testResources"> - <au:assertTrue> - <resourcecount count="2"> - <restrict> - <exists /> - <resources refid="my-set" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testMappedResources"> - <au:assertTrue> - <resourcecount count="2"> - <restrict> - <exists /> - <propertyset> - <propertyset refid="my-set" /> - <globmapper from="bar*" to="far*" /> - </propertyset> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/archives-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/archives-test.xml deleted file mode 100644 index 961effc7..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/archives-test.xml +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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="testExtractJars"> - <mkdir dir="${output}"/> - <copy todir="${output}"> - <archives> - <zips> - <fileset dir="${ant.home}/lib" - includes="ant-*.jar"/> - </zips> - </archives> - </copy> - <au:assertFileExists - file="${output}/org/apache/tools/ant/launch/Launcher.class"/> - <au:assertFileExists - file="${output}/org/apache/tools/ant/BuildFileTest.class"/> - </target> - - <target name="testMixingZipsAndTars"> - <mkdir dir="${output}"/> - <tar destfile="${output}/test.tar.gz" compression="gzip"> - <fileset file="${ant.file}"/> - </tar> - <copy todir="${output}"> - <archives> - <zips> - <fileset dir="${ant.home}/lib" - includes="ant-launcher.jar"/> - </zips> - <tars> - <gzipresource> - <file file="${output}/test.tar.gz"/> - </gzipresource> - </tars> - </archives> - </copy> - <au:assertFileExists - file="${output}/org/apache/tools/ant/launch/Launcher.class"/> - <basename property="filename" file="${ant.file}"/> - <au:assertFileExists file="${output}/${filename}"/> - </target> - - <target name="testReference"> - <mkdir dir="${output}"/> - <archives id="ref"> - <zips> - <fileset dir="${ant.home}/lib" - includes="ant-launcher.jar"/> - </zips> - </archives> - <copy todir="${output}"> - <archives refid="ref"/> - </copy> - <au:assertFileExists - file="${output}/org/apache/tools/ant/launch/Launcher.class"/> - </target> - - <target name="testCircularReference"> - <au:expectfailure - message="This data type contains a circular reference."> - <copy todir="${output}"> - <archives id="ref"> - <zips> - <archives refid="ref"/> - </zips> - </archives> - </copy> - </au:expectfailure> - <au:expectfailure - message="This data type contains a circular reference."> - <copy todir="${output}"> - <archives refid="ref"/> - </copy> - </au:expectfailure> - </target> - - <!-- works but takes a veeeeeery long time --> - <target name="XtestResourcesManualExample"> - <mkdir dir="${output}"/> - <copy todir="${output}"> - <archives> - <zips> - <restrict> - <path path="${java.class.path}"/> - <name name="*.jar"/> - </restrict> - </zips> - </archives> - </copy> - <au:assertFileExists - file="${output}/org/apache/tools/ant/launch/Launcher.class"/> - </target> - - <target name="testZipManualExample"> - <mkdir dir="${output}/control"/> - <mkdir dir="${input}/htdocs/manual"/> - <touch file="${input}/htdocs/manual/foo.txt"/> - <zip destfile="${input}/examples-a.zip"> - <fileset dir="." includes="*.xml"/> - </zip> - <zip destfile="${output}/manual.zip"> - <mappedresources> - <fileset dir="${input}/htdocs/manual"/> - <globmapper from="*" to="docs/user-guide/*"/> - </mappedresources> - <archives> - <zips> - <fileset dir="${input}" includes="examples*.zip"/> - </zips> - </archives> - </zip> - <unzip src="${output}/manual.zip" dest="${output}/control"/> - <au:assertFileExists file="${output}/control/archives-test.xml"/> - <au:assertFileExists file="${output}/control/docs/user-guide/foo.txt"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/comparators/test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/comparators/test.xml deleted file mode 100644 index 524f67a1..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/comparators/test.xml +++ /dev/null @@ -1,299 +0,0 @@ -<?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" - xmlns:rcmp="antlib:org.apache.tools.ant.types.resources.comparators"> - - <import file="../../../antunit-base.xml" /> - - <property name="dirname" value="work" /> - <property name="dir" location="${output}/${dirname}" /> - <property name="echolevel" value="debug" /> - - <target name="tearDown"> - <delete dir="${dir}" /> - <delete file="${zip}" /> - <delete file="${jar}" deleteonexit="true" /> - <delete file="${file}" /> - </target> - - <target name="setUp"> - <mkdir dir="${dir}" /> - - <echo file="${dir}/b" message="yyy" /> - <echo file="${dir}/e" message="aaa" /> - <sleep seconds="2" /> - <echo file="${dir}/c" message="x" /> - <echo file="${dir}/d" message="x" /> - <sleep seconds="2" /> - <echo file="${dir}/a" message="zz" /> - <echo file="${dir}/f" message="zz" /> - - <mkdir dir="${dir}/a.dir" /> - <mkdir dir="${dir}/b.dir" /> - <mkdir dir="${dir}/c.dir" /> - - <macrodef name="mysort"> - <attribute name="property" /> - <attribute name="separator" default="," /> - <element name="cmp" optional="true" implicit="true" /> - <sequential> - <pathconvert property="@{property}" pathsep="@{separator}"> - <sort> - <fileset dir="${dir}" includes="a,b,c" /> - <cmp /> - </sort> - <flattenmapper /> - </pathconvert> - <echo level="${echolevel}">@{property}=${@{property}}</echo> - </sequential> - </macrodef> - </target> - - <target name="testsortdefault" depends="setUp"> - <mysort property="sortdf" /> - <au:assertTrue> - <equals arg1="${sortdf}" arg2="a,b,c" /> - </au:assertTrue> - </target> - - <target name="testrvdefault" depends="setUp"> - <mysort property="sortdf-rev"> - <rcmp:reverse /> - </mysort> - <au:assertTrue> - <equals arg1="${sortdf-rev}" arg2="c,b,a" /> - </au:assertTrue> - </target> - - <target name="testname" depends="setUp"> - <mysort property="sortnm"> - <rcmp:name /> - </mysort> - <au:assertTrue> - <equals arg1="${sortnm}" arg2="a,b,c" /> - </au:assertTrue> - </target> - - <target name="testrvname" depends="setUp"> - <mysort property="sortnm-rev"> - <rcmp:reverse> - <rcmp:name /> - </rcmp:reverse> - </mysort> - <au:assertTrue> - <equals arg1="${sortnm-rev}" arg2="c,b,a" /> - </au:assertTrue> - </target> - - <target name="testdate" depends="setUp"> - <mysort property="sortlm"> - <rcmp:date /> - </mysort> - <au:assertTrue> - <equals arg1="${sortlm}" arg2="b,c,a" /> - </au:assertTrue> - </target> - - <target name="testrvdate" depends="setUp"> - <mysort property="sortlm-rev"> - <rcmp:reverse> - <rcmp:date /> - </rcmp:reverse> - </mysort> - <au:assertTrue> - <equals arg1="${sortlm-rev}" arg2="a,c,b" /> - </au:assertTrue> - </target> - - <target name="testsize" depends="setUp"> - <mysort property="sortsz"> - <rcmp:size /> - </mysort> - <au:assertTrue> - <equals arg1="${sortsz}" arg2="c,a,b" /> - </au:assertTrue> - </target> - - <target name="testrvsize" depends="setUp"> - <mysort property="sortsz-rev"> - <rcmp:reverse> - <rcmp:size /> - </rcmp:reverse> - </mysort> - <au:assertTrue> - <equals arg1="${sortsz-rev}" arg2="b,a,c" /> - </au:assertTrue> - </target> - - <target name="testcontent" depends="setUp"> - <mysort property="sortct"> - <rcmp:content /> - </mysort> - <au:assertTrue> - <equals arg1="${sortct}" arg2="c,b,a" /> - </au:assertTrue> - </target> - - <target name="testrvcontent" depends="setUp"> - <mysort property="sortct-rev"> - <rcmp:reverse> - <rcmp:content /> - </rcmp:reverse> - </mysort> - <au:assertTrue> - <equals arg1="${sortct-rev}" arg2="a,b,c" /> - </au:assertTrue> - </target> - - <target name="testexists" depends="setUp"> - <pathconvert property="sortex" pathsep=","> - <sort> - <resources> - <file file="${dir}/a" /> - <resource name="redherring" exists="false" /> - </resources> - <rcmp:exists /> - </sort> - <flattenmapper /> - </pathconvert> - <au:assertTrue> - <equals arg1="${sortex}" arg2="redherring,a" /> - </au:assertTrue> - </target> - - <target name="testrvexists" depends="setUp"> - <pathconvert property="sortex-rev" pathsep=","> - <sort> - <resources> - <file file="${dir}/a" /> - <resource name="redherring" exists="false" /> - </resources> - <rcmp:reverse> - <rcmp:exists /> - </rcmp:reverse> - </sort> - <flattenmapper /> - </pathconvert> - <au:assertTrue> - <equals arg1="${sortex-rev}" arg2="a,redherring" /> - </au:assertTrue> - </target> - - <target name="testtype" depends="setUp"> - <pathconvert property="sorttp" pathsep=","> - <sort> - <resources> - <file file="${dir}/a" /> - <file file="${dir}/a.dir" /> - </resources> - <rcmp:type /> - </sort> - <flattenmapper /> - </pathconvert> - <au:assertPropertyEquals name="sorttp" value="a,a.dir" /> - </target> - - <target name="testrvtype" depends="setUp"> - <pathconvert property="sorttp-rev" pathsep=","> - <sort> - <resources> - <file file="${dir}/a" /> - <file file="${dir}/a.dir" /> - </resources> - <rcmp:reverse> - <rcmp:type /> - </rcmp:reverse> - </sort> - <flattenmapper /> - </pathconvert> - <au:assertTrue> - <equals arg1="${sorttp-rev}" arg2="a.dir,a" /> - </au:assertTrue> - </target> - - <target name="forwardsort" - depends="testsortdefault,testname,testdate,testsize,testcontent,testexists,testtype" /> - - <target name="reversesort" - depends="testrvdefault,testrvname,testrvdate,testrvsize,testrvcontent,testrvexists,testrvtype" /> - - <target name="testcompoundsort1" depends="setUp"> - <pathconvert property="sortcmp1" pathsep=","> - <sort> - <resources> - <file file="${dir}/c" /> - <file file="${dir}/b.dir" /> - <file file="${dir}/a" /> - <file file="${dir}/c.dir" /> - <file file="${dir}/b" /> - <file file="${dir}/a.dir" /> - </resources> - <rcmp:reverse> - <rcmp:type /> - </rcmp:reverse> - <rcmp:name /> - </sort> - <flattenmapper /> - </pathconvert> - <au:assertPropertyEquals name="sortcmp1" value="a.dir,b.dir,c.dir,a,b,c" /> - </target> - - <target name="testcompoundsort2" depends="setUp"> - <pathconvert property="sortcmp2" pathsep=","> - <sort> - <fileset dir="${dir}" includes="?"/> - <rcmp:size /> - <rcmp:content /> - <rcmp:reverse> - <rcmp:name /> - </rcmp:reverse> - </sort> - <flattenmapper /> - </pathconvert> - <au:assertPropertyEquals name="sortcmp2" value="d,c,f,a,e,b" /> - </target> - - <target name="compoundsort" depends="testcompoundsort1,testcompoundsort2" /> - - <target name="sort" depends="forwardsort,reversesort,compoundsort" /> - - <target name="testEquals"> - <!-- test for PR 46527 --> - <sort id="testEquals"> - <resources> - <string>foo</string> - <string>foo</string> - <string>foo</string> - </resources> - </sort> - - <au:assertTrue> - <resourcecount refid="testEquals" count="3" /> - </au:assertTrue> - - <pathconvert refid="testEquals" property="testEquals" pathsep="" preserveduplicates="true"> - <mergemapper to="X" /> - </pathconvert> - - <au:assertTrue> - <length string="${testEquals}" length="3" /> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/concat-resource-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/concat-resource-test.xml deleted file mode 100644 index 554c13d2..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/concat-resource-test.xml +++ /dev/null @@ -1,160 +0,0 @@ -<?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 name="test-concat" basedir="." default="antunit" - xmlns:au="antlib:org.apache.ant.antunit"> - - <import file="../../antunit-base.xml" /> - - <property name="br" value="${line.separator}" /> - <property name="world" value="World" /> - - <target name="testCountEquals1"> - <au:assertTrue> - <resourcecount count="1"> - <concat>Hello, ${world}!</concat> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testReplacement"> - <au:assertTrue> - <resourcesmatch> - <string>Hello, ${world}!</string> - <concat>Hello, ${world}!</concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testResources"> - <au:assertTrue> - <resourcesmatch> - <string>foobarbaz</string> - <concat> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testFixLastLineResources"> - <au:assertTrue> - <resourcesmatch> - <string>foo${line.separator}bar${line.separator}baz${line.separator}</string> - <concat fixlastline="true"> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testEncoding"> - <mkdir dir="${output}"/> - <copy file="utf-16.in" toDir="${output}" encoding="utf-16"> - <filterchain> - <fixcrlf/> - </filterchain> - </copy> - <au:assertTrue> - <resourcesmatch astext="true"> - <file file="${output}/utf-16.in" /> - <concat outputEncoding="utf-16">foo${br}bar${br}baz${br}</concat> - <concat outputEncoding="utf-16" fixlastline="true"> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testFiltering"> - <au:assertTrue> - <resourcesmatch astext="true"> - <concat>foo${br}bar${br}baz${br}</concat> - <concat> -foo -#comment 1 -bar -#comment 2 -baz -#comment 3 - <filterchain> - <striplinecomments> - <comment value="#" /> - </striplinecomments> - <ignoreblank /> - </filterchain> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testReference"> - <resources id="concat"> - <concat>foo</concat> - </resources> - <au:assertTrue> - <and> - <resourcecount count="1" refid="concat" /> - <resourcesmatch> - <string>foo</string> - <resources refid="concat" /> - <!-- purposely hit it twice to see what happens --> - <resources refid="concat" /> - </resourcesmatch> - </and> - </au:assertTrue> - </target> - - <target name="testNonexistent"> - <au:assertTrue> - <resourcesmatch> - <string>foobar</string> - <concat> - <string>foo</string> - <propertyresource name="someunsetproperty" /> - <string>bar</string> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testResourceName"> - <au:assertTrue> - <resourcecount count="1"> - <restrict> - <name name="snicklefritz" /> - <resources> - <concat resourceName="snicklefritz"> - whatever - </concat> - <concat> - whatever - </concat> - </resources> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/fileresource-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/fileresource-test.xml deleted file mode 100644 index 71141193..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/fileresource-test.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?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" /> - - <!-- using restrict/exists to force getFile() to be called --> - - <target name="testFileAsBaseline"> - <au:assertTrue> - <resourcecount when="ge" count="0"> - <restrict> - <exists /> - <file name="foo" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testNameOnly"> - <au:assertTrue> - <resourcecount when="ge" count="0"> - <restrict> - <exists /> - <file name="foo" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testNameAndBasedir"> - <au:assertTrue> - <resourcecount when="ge" count="0"> - <restrict> - <exists /> - <file basedir="${basedir}" name="foo" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/files-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/files-test.xml deleted file mode 100644 index 447a2623..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/files-test.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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 name="files-test" default="antunit" xmlns:au="antlib:org.apache.ant.antunit"> - - <target name="antunit"> - <au:antunit> - <au:plainlistener/> - <file file="${ant.file}"/> - </au:antunit> - </target> - - <target name="setUp"> - <property name="out" value="out"/> - </target> - - <target name="tearDown"> - <delete dir="${out}"/> - </target> - - <target name="testEmptyReference" description="Bug43048"> - <files id="foo"/> - <mkdir dir="${out}"/> - <copy todir="${out}"> - <!-- threw a java.lang.NullPointerException --> - <files refid="foo"/> - </copy> - </target> - - <target name="testEmptyFiles" description="Bug43048"> - <mkdir dir="${out}"/> - <copy todir="${out}"> - <files/> - </copy> - </target> - - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/first-last-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/first-last-test.xml deleted file mode 100644 index e7fc831b..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/first-last-test.xml +++ /dev/null @@ -1,280 +0,0 @@ -<?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" /> - - <tokens id="testrc"> - <string value="1,2,3,4,5" /> - <stringtokenizer delims="," /> - </tokens> - - <target name="testfirst0"> - <au:assertTrue> - <resourcecount count="0"> - <first count="0"><resources refid="testrc" /></first> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfirst1"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <first><resources refid="testrc" /></first> - <string value="1" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfirst2"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <first count="2"><resources refid="testrc" /></first> - <resources> - <string value="1" /> - <string value="2" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfirst5"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <first count="5"><resources refid="testrc" /></first> - <resources refid="testrc" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfirst6"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <first count="6"><resources refid="testrc" /></first> - <resources refid="testrc" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfirst-1"> - <au:expectfailure expectedmessage="size-limited collection count should be set to an int >= 0"> - <resourcecount> - <first count="-1"><resources refid="testrc" /></first> - </resourcecount> - </au:expectfailure> - </target> - - <target name="testlast0"> - <au:assertTrue> - <resourcecount count="0"> - <last count="0"><resources refid="testrc" /></last> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testlast1"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <last><resources refid="testrc" /></last> - <string value="5" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testlast2"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <last count="2"><resources refid="testrc" /></last> - <resources> - <string value="4" /> - <string value="5" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testlast5"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <last count="5"><resources refid="testrc" /></last> - <resources refid="testrc" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testlast6"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <last count="6"><resources refid="testrc" /></last> - <resources refid="testrc" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testlast-1"> - <au:expectfailure expectedmessage="size-limited collection count should be set to an int >= 0"> - <resourcecount> - <last count="-1"><resources refid="testrc" /></last> - </resourcecount> - </au:expectfailure> - </target> - - <target name="testallbutfirst5"> - <au:assertTrue> - <resourcecount count="0"> - <allbutfirst count="5"><resources refid="testrc" /></allbutfirst> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutfirst4"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <allbutfirst count="4"><resources refid="testrc" /></allbutfirst> - <string value="5" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutfirst3"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <allbutfirst count="3"><resources refid="testrc" /></allbutfirst> - <resources> - <string value="4" /> - <string value="5" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutfirst"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <allbutfirst><resources refid="testrc" /></allbutfirst> - <resources> - <string value="2" /> - <string value="3" /> - <string value="4" /> - <string value="5" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutfirst6"> - <au:assertTrue> - <resourcecount count="0"> - <allbutfirst count="6"><resources refid="testrc" /></allbutfirst> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutfirst-1"> - <au:expectfailure expectedmessage="size-limited collection count should be set to an int >= 0"> - <resourcecount> - <allbutfirst count="-1"><resources refid="testrc" /></allbutfirst> - </resourcecount> - </au:expectfailure> - </target> - - <target name="testallbutlast5"> - <au:assertTrue> - <resourcecount count="0"> - <allbutlast count="5"><resources refid="testrc" /></allbutlast> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutlast4"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <allbutlast count="4"><resources refid="testrc" /></allbutlast> - <string value="1" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutlast1"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <allbutlast><resources refid="testrc" /></allbutlast> - <resources> - <string value="1" /> - <string value="2" /> - <string value="3" /> - <string value="4" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutlast0"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <allbutlast count="0"><resources refid="testrc" /></allbutlast> - <resources refid="testrc" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutlast6"> - <au:assertTrue> - <resourcecount count="0"> - <allbutlast count="6"><resources refid="testrc" /></allbutlast> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testallbutlast-1"> - <au:expectfailure expectedmessage="size-limited collection count should be set to an int >= 0"> - <resourcecount> - <allbutlast count="-1"><resources refid="testrc" /></allbutlast> - </resourcecount> - </au:expectfailure> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/javaresource-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/javaresource-test.xml deleted file mode 100644 index a83184d0..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/javaresource-test.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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="setUp"> - <mkdir dir="${output}"/> - </target> - - <target name="testUsesSystemClasspath" depends="setUp"> - <copy todir="${output}"> - <javaresource name="org/apache/tools/ant/antlib.xml"/> - </copy> - <au:assertFileExists file="${output}/org/apache/tools/ant/antlib.xml"/> - </target> - - <target name="-setUpAntlibXmlInInput" depends="setUp"> - <mkdir dir="${input}/org/apache/tools/ant"/> - <echo file="${input}/org/apache/tools/ant/antlib.xml">Hello, world!</echo> - </target> - - <target name="testParentFirstIsDefault" depends="-setUpAntlibXmlInInput"> - <copy todir="${output}"> - <javaresource name="org/apache/tools/ant/antlib.xml"> - <classpath location="${input}"/> - </javaresource> - </copy> - <au:assertFileExists file="${output}/org/apache/tools/ant/antlib.xml"/> - <au:assertFilesDiffer - expected="${input}/org/apache/tools/ant/antlib.xml" - actual="${output}/org/apache/tools/ant/antlib.xml"/> - </target> - - <target name="testParentFirstFalse" depends="-setUpAntlibXmlInInput" unless="build.sysclasspath.only"> - <copy todir="${output}"> - <javaresource name="org/apache/tools/ant/antlib.xml" - parentFirst="false"> - <classpath location="${input}"/> - </javaresource> - </copy> - <au:assertFileExists file="${output}/org/apache/tools/ant/antlib.xml"/> - <au:assertFilesMatch - expected="${input}/org/apache/tools/ant/antlib.xml" - actual="${output}/org/apache/tools/ant/antlib.xml"/> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/latepath-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/latepath-test.xml deleted file mode 100644 index 5cafffde..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/latepath-test.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?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"> - - <target name="testLatePath" depends="tearDown"> - <path id="p"> - <fileset file="testLatePath" /> - </path> - <pathconvert refid="p" /> - <touch file="testLatePath" /> - <au:assertTrue> - <resourcecount when="eq" count="1" refid="p" /> - </au:assertTrue> - </target> - - <target name="tearDown"> - <delete file="testLatePath" /> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/multirootfileset-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/multirootfileset-test.xml deleted file mode 100644 index 27b6193e..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/multirootfileset-test.xml +++ /dev/null @@ -1,166 +0,0 @@ -<?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="a" location="${input}/a"/> - <property name="b" location="${input}/b"/> - <touch mkdirs="true" file="${a}/1/1.txt"/> - <touch mkdirs="true" file="${a}/1/2.txt"/> - <touch mkdirs="true" file="${a}/1/3.txt"/> - <touch mkdirs="true" file="${b}/2/3.txt"/> - <touch mkdirs="true" file="${b}/2/4.txt"/> - <mkdir dir="${output}"/> - </target> - - <target name="test-count-in-simple-configuration" depends="setUp"> - <resourcecount property="files"> - <multirootfileset basedirs="${a},${b}"/> - </resourcecount> - <resourcecount property="dirs"> - <multirootfileset basedirs="${a},${b}" type="dir"/> - </resourcecount> - <resourcecount property="files-and-dirs"> - <multirootfileset basedirs="${a},${b}" type="both"/> - </resourcecount> - <au:assertPropertyEquals value="5" name="files"/> - <au:assertPropertyEquals value="4" name="dirs"/> - <au:assertPropertyEquals value="9" name="files-and-dirs"/> - </target> - - <target name="test-count-nested-basedir-elements" depends="setUp"> - <resourcecount property="files"> - <multirootfileset> - <basedir file="${a}"/> - <basedir file="${b}"/> - </multirootfileset> - </resourcecount> - <resourcecount property="dirs"> - <multirootfileset type="dir"> - <basedir file="${a}"/> - <basedir file="${b}"/> - </multirootfileset> - </resourcecount> - <resourcecount property="files-and-dirs"> - <multirootfileset type="both"> - <basedir file="${a}"/> - <basedir file="${b}"/> - </multirootfileset> - </resourcecount> - <au:assertPropertyEquals value="5" name="files"/> - <au:assertPropertyEquals value="4" name="dirs"/> - <au:assertPropertyEquals value="9" name="files-and-dirs"/> - </target> - - <target name="test-copying" depends="setUp"> - <copy todir="${output}"> - <multirootfileset basedirs="${a},${b}"/> - </copy> - <au:assertFileExists file="${output}/1/1.txt"/> - <au:assertFileExists file="${output}/1/2.txt"/> - <au:assertFileExists file="${output}/1/3.txt"/> - <au:assertFileExists file="${output}/2/3.txt"/> - <au:assertFileExists file="${output}/2/4.txt"/> - </target> - - <target name="test-dirs" depends="setUp"> - <pathconvert property="dirs" pathsep=":"> - <multirootfileset basedirs="${a},${b}" type="dir"/> - </pathconvert> - <au:assertPropertyEquals value="${a}:${a}${file.separator}1:${b}:${b}${file.separator}2" - name="dirs"/> - </target> - - <target name="test-include-pattern" depends="setUp"> - <copy todir="${output}"> - <multirootfileset basedirs="${a},${b}"> - <include name="**/3.txt"/> - </multirootfileset> - </copy> - <au:assertFileDoesntExist file="${output}/1/1.txt"/> - <au:assertFileExists file="${output}/1/3.txt"/> - <au:assertFileExists file="${output}/2/3.txt"/> - <au:assertFileDoesntExist file="${output}/2/4.txt"/> - <pathconvert property="dirs" pathsep=":"> - <multirootfileset basedirs="${a},${b}" type="dir"> - <include name="1/"/> - </multirootfileset> - </pathconvert> - <au:assertPropertyEquals value="${a}${file.separator}1" name="dirs"/> - </target> - - <target name="test-exclude-pattern" depends="setUp"> - <copy todir="${output}"> - <multirootfileset basedirs="${a},${b}"> - <exclude name="**/3.txt"/> - </multirootfileset> - </copy> - <au:assertFileExists file="${output}/1/1.txt"/> - <au:assertFileDoesntExist file="${output}/1/3.txt"/> - <au:assertFileDoesntExist file="${output}/2/3.txt"/> - <au:assertFileExists file="${output}/2/4.txt"/> - <pathconvert property="dirs" pathsep=":"> - <multirootfileset basedirs="${a},${b}" type="dir"> - <exclude name="1/"/> - </multirootfileset> - </pathconvert> - <au:assertPropertyEquals value="${a}:${b}:${b}${file.separator}2" - name="dirs"/> - </target> - - <target name="test-selectors" depends="setUp"> - <copy todir="${output}"> - <multirootfileset basedirs="${a},${b}"> - <filename regex=".*3\.txt"/> - </multirootfileset> - </copy> - <au:assertFileDoesntExist file="${output}/1/1.txt"/> - <au:assertFileExists file="${output}/1/3.txt"/> - <au:assertFileExists file="${output}/2/3.txt"/> - <au:assertFileDoesntExist file="${output}/2/4.txt"/> - <pathconvert property="dirs" pathsep=":"> - <multirootfileset basedirs="${a},${b}" type="dir"> - <filename regex="1"/> - </multirootfileset> - </pathconvert> - <au:assertPropertyEquals value="${a}${file.separator}1" name="dirs"/> - </target> - - <target name="test-cache-false" depends="setUp"> - <copy todir="${output}"> - <multirootfileset basedirs="${a},${b}" cache="false"> - <filename regex=".*3\.txt"/> - </multirootfileset> - </copy> - <au:assertFileDoesntExist file="${output}/1/1.txt"/> - <au:assertFileExists file="${output}/1/3.txt"/> - <au:assertFileExists file="${output}/2/3.txt"/> - <au:assertFileDoesntExist file="${output}/2/4.txt"/> - <multirootfileset basedirs="${a},${b}" type="dir" cache="false" - id="the-one-dirs"> - <filename regex="1"/> - </multirootfileset> - <pathconvert property="dirs" pathsep=":" refid="the-one-dirs"/> - <au:assertPropertyEquals value="${a}${file.separator}1" name="dirs"/> - <resourcecount property="dir-count" refid="the-one-dirs" /> - <au:assertPropertyEquals value="1" name="dir-count"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/resourcelist-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/resourcelist-test.xml deleted file mode 100644 index 33577476..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/resourcelist-test.xml +++ /dev/null @@ -1,104 +0,0 @@ -<?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 name="test-concat" basedir="." default="antunit" - xmlns:au="antlib:org.apache.ant.antunit"> - - <import file="../../antunit-base.xml" /> - - <target name="setUp"> - <mkdir dir="${input}"/> - <mkdir dir="${output}"/> - <touch file="${input}/b.txt"/> - </target> - - <target name="testBasicOperation" depends="setUp"> - <echo file="${input}/a.txt">${input}/b.txt -${input}/c.txt</echo> - <property name="c" location="${input}/c.txt"/> - <au:expectfailure expectedmessage="Could not find resource file "${c}""> - <copy todir="${output}" flatten="true"> - <resourcelist> - <file file="${input}/a.txt"/> - </resourcelist> - </copy> - </au:expectfailure> - <copy todir="${output}" flatten="true"> - <restrict> - <resourcelist> - <file file="${input}/a.txt"/> - </resourcelist> - <exists/> - </restrict> - </copy> - <au:assertFileExists file="${output}/b.txt"/> - <au:assertFileDoesntExist file="${output}/c.txt"/> - </target> - - <target name="testExpandsProperties" depends="setUp"> - <echo file="${input}/a.txt">$${input}/b.txt</echo> - <copy todir="${output}" flatten="true"> - <resourcelist> - <file file="${input}/a.txt"/> - </resourcelist> - </copy> - <au:assertFileExists file="${output}/b.txt"/> - </target> - - <target name="testFilterChain" depends="setUp"> - <echo file="${input}/a.txt">b.txt</echo> - <au:expectfailure expectedmessage="Could not find resource file"> - <copy todir="${output}" flatten="true"> - <resourcelist> - <file file="${input}/a.txt"/> - </resourcelist> - </copy> - </au:expectfailure> - <copy todir="${output}" flatten="true"> - <resourcelist> - <file file="${input}/a.txt"/> - <filterchain> - <prefixlines prefix="${input}/"/> - </filterchain> - </resourcelist> - </copy> - <au:assertFileExists file="${output}/b.txt"/> - </target> - - <target name="testPropertyExpandsToObject" depends="setUp"> - <file file="${ant.file}" id="self"/> - <echo file="${input}/a.txt">$${ant.refid:self}</echo> - <copy todir="${output}" flatten="true"> - <resourcelist> - <file file="${input}/a.txt"/> - </resourcelist> - </copy> - <au:assertFileExists file="${output}/resourcelist-test.xml"/> - </target> - - <target name="testReadsURLs" depends="setUp"> - <makeurl file="${ant.core.lib}" property="ant.jar"/> - <echo file="${input}/a.txt">jar:${ant.jar}!/org/apache/tools/ant/antlib.xml</echo> - <copy todir="${output}" flatten="true"> - <resourcelist> - <file file="${input}/a.txt"/> - </resourcelist> - </copy> - <au:assertFileExists file="${output}/antlib.xml"/> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/resources-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/resources-test.xml deleted file mode 100644 index 19985c72..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/resources-test.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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="testToString" - description="https://issues.apache.org/bugzilla/show_bug.cgi?id=49588"> - <resources id="A"> - <string value="b"/> - </resources> - <union id="union"><resources refid="A"/></union> - <au:assertEquals expected="b" actual="${toString:A}"/> - <au:assertEquals expected="b" actual="${toString:union}"/> - <au:assertEquals expected="b" actual="${toString:A}"/> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/name-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/name-test.xml deleted file mode 100644 index 84cbedb4..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/name-test.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?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" /> - - <property name="file" value="testfile"/> - - <target name="createTestdir"> - <mkdir dir="${output}"/> - <touch file="${output}/${file}"/> - </target> - - <target name="testPattern" depends="createTestdir"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <fileset dir="${output}"/> - <name name="*"/> - </restrict> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <restrict> - <fileset dir="${output}"/> - <name name=".*"/> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testRegex" depends="createTestdir"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <fileset dir="${output}"/> - <name regex=".*"/> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testHandledirSep" depends="createTestdir"> - <au:assertTrue> - <!-- only one should match the current platform --> - <resourcecount when="equal" count="1"> - <resources> - <restrict> - <fileset dir="${output}"/> - <name name="**/${file}"/> - </restrict> - <restrict> - <fileset dir="${output}"/> - <name name="**\${file}"/> - </restrict> - </resources> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <resources> - <restrict> - <fileset dir="${output}"/> - <name name="**/${file}" handleDirSep="true"/> - </restrict> - <restrict> - <fileset dir="${output}"/> - <name name="**\${file}" handleDirSep="true"/> - </restrict> - </resources> - </resourcecount> - </au:assertTrue> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/readwrite-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/readwrite-test.xml deleted file mode 100644 index 6a0301ba..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/readwrite-test.xml +++ /dev/null @@ -1,106 +0,0 @@ -<?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" - xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors"> - - <import file="../../../antunit-base.xml" /> - - <property name="dir" location="testdir"/> - <property name="file" value="testfile"/> - - <condition property="unix"> - <os family="unix"/> - </condition> - - <target name="createTestdir"> - <mkdir dir="${output}"/> - <touch file="${output}/${file}"/> - </target> - - <target name="testReadable" depends="createTestdir"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <fileset dir="${output}"/> - <rsel:readable/> - </restrict> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <restrict> - <fileset dir="${output}" excludes="${file}"/> - <rsel:readable/> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testWritable" depends="createTestdir"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <fileset dir="${output}"/> - <rsel:writable/> - </restrict> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <restrict> - <fileset dir="${output}" excludes="${file}"/> - <rsel:writable/> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="makeFileUnwritable" - depends="createTestdir,makeFileUnwritable-Unix,makeFileUnwritable-Windows"/> - <target name="makeFileUnwritable-Unix" id="unix"> - <chmod file="${output}/${file}" perm="444"/> - </target> - <target name="makeFileUnwritable-Windows" unless="unix"> - <attrib file="${output}/${file}" readonly="true"/> - </target> - - <target name="testUnwritable" depends="makeFileUnwritable"> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <restrict> - <fileset dir="${output}"/> - <rsel:writable/> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testAsConditions" depends="makeFileUnwritable"> - <au:assertTrue> - <isfileselected file="${output}/${file}"> - <rsel:readable/> - </isfileselected> - </au:assertTrue> - <au:assertFalse> - <isfileselected file="${output}/${file}"> - <rsel:writable/> - </isfileselected> - </au:assertFalse> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/test-componentdef.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/test-componentdef.xml deleted file mode 100644 index 187412ec..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/test-componentdef.xml +++ /dev/null @@ -1,458 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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="all" xmlns:au="antlib:org.apache.ant.antunit"> - - <available property="jdk1.4+" classname="java.lang.CharSequence"/> - <condition property="some.regexp.support"> - <or> - <isset property="jdk1.4+"/> - <isset property="apache.regexp.present"/> - <isset property="apache.oro.present"/> - </or> - </condition> - - <target name="testname1"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <resource name="foo" /> - <resource name="bar" /> - <resource name="baz" /> - <resource name="boo" /> - <resource name="bang" /> - </resources> - <name name="ba?" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testname2"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <file file="foo" /> - <resource name="foo" /> - <file file="foo" basedir="${basedir}" /> - </resources> - <name name="foo" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="name" depends="testname1,testname2" /> - - <target name="testexists"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <file file="idonotexist" /> - <resource name="foo" /> - <resource name="foo" exists="false" /> - </resources> - <exists /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testinstanceoftype1"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <file file="foo" /> - <url url="http://ant.apache.org/index.html" /> - <resource name="foo" /> - <string value="foo" /> - <file file="bar" /> - </resources> - <instanceof type="file" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testinstanceoftype2"> - <typedef name="file" uri="test" - classname="org.apache.tools.ant.types.resources.FileResource" /> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <url file="foo" /> - <file file="bar" xmlns="test" /> - </resources> - <instanceof type="test:file" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testinstanceoftype3"> - <typedef name="file" uri="test" - classname="org.apache.tools.ant.types.resources.FileResource" /> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <url file="foo" /> - <file file="bar" xmlns="test" /> - </resources> - <instanceof type="file" uri="test" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="instanceoftype" - depends="testinstanceoftype1,testinstanceoftype2,testinstanceoftype3" /> - - <target name="testinstanceofclass"> - <au:assertTrue> - <resourcecount when="equal" count="7"> - <restrict> - <resources> - <filelist dir="${basedir}" files="a,b,c,d,e,f,g" /> - </resources> - <instanceof class="org.apache.tools.ant.types.Resource" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="instanceof" depends="instanceoftype,testinstanceofclass" /> - - <target name="testtype"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <file file="${basedir}" /> - <file file="${ant.file}" /> - <resource directory="true" /> - <resource directory="false" /> - </resources> - <type type="dir" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testdate"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <resource lastmodified="4" /> - <resource lastmodified="5" /> - <resource lastmodified="6" /> - <resource lastmodified="7" /> - <resource lastmodified="8" /> - </resources> - <date when="after" millis="5" granularity="0" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testsize"> - <au:assertTrue> - <resourcecount when="equal" count="4"> - <restrict> - <resources> - <resource size="4" /> - <resource size="5" /> - <resource size="6" /> - <resource size="7" /> - <resource size="8" /> - </resources> - <size when="le" size="7" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testand"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <and xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - </and> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testor"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <or xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - </or> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testnot"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <not xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <size size="3" /> - </not> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testnone"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <none xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - </none> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testmajority1"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <majority xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - <instanceof type="string" /> - </majority> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testmajority2"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <majority> - <name name="f?" /> - <size size="3" /> - <instanceof type="resource" /> - </majority> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testmajority3"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <majority allowtie="true"> - <name name="f?" /> - <size size="3" /> - <instanceof type="string" /> - <exists /> - </majority> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testmajority4"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <majority allowtie="false"> - <name name="f?" /> - <size size="3" /> - <instanceof type="string" /> - <exists /> - </majority> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testcontains"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </resources> - <contains text="b"/> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testcontainsregexp" if="some.regexp.support"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </resources> - <containsregexp expression="^b..$"/> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testcompare"> - <au:assertTrue> - <and> - <!-- basic test, natural ordering --> - <resourcecount count="3"> - <restrict> - <compare when="greater" against="each"> - <control><string value="b" /></control> - </compare> - <resources> - <string value="a" /> - <string value="b" /> - <string value="c" /> - <string value="d" /> - <string value="e" /> - </resources> - </restrict> - </resourcecount> - <!-- one comparator, default when/against --> - <resourcecount count="5"> - <restrict> - <compare> - <control><string value="." /></control> - <size /> - </compare> - <resources> - <string value="a" /> - <string value="b" /> - <string value="c" /> - <string value="d" /> - <string value="e" /> - </resources> - </restrict> - </resourcecount> - <!-- multiple controls, comparators --> - <resourcecount count="3"> - <restrict> - <compare when="greater" against="each"> - <control> - <string value="a" /> - <string value="b" /> - <string value="bb" /> - <string value="c" /> - <string value="ccc" /> - </control> - <name /> - <size /> - </compare> - <resources> - <string value="a" /> - <string value="bbbb" /> - <string value="ccc" /> - <string value="cccc" /> - <string value="d" /> - <string value="e" /> - </resources> - </restrict> - </resourcecount> - </and> - </au:assertTrue> - </target> - - <target name="majority" - depends="testmajority1,testmajority2,testmajority3,testmajority4" /> - - <target name="logical" - depends="testand,testor,testnone,testnot,majority" /> - - <target name="all" - depends="name,testexists,instanceof,testtype,testdate,testsize,testcontains,testcontainsregexp,logical,testcompare" /> - - <!-- - The tests for oata.types.selectors.ModifiedSelectorTest as - ResourceSelector are in its test-buildfile src\etc\testcases\types\selectors.xml. - --> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/test.xml deleted file mode 100644 index 24b804a3..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/selectors/test.xml +++ /dev/null @@ -1,483 +0,0 @@ -<?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" - xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors" - xmlns:rcmp="antlib:org.apache.tools.ant.types.resources.comparators"> - - <import file="../../../antunit-base.xml" /> - - <available property="jdk1.4+" classname="java.lang.CharSequence"/> - <condition property="some.regexp.support"> - <or> - <isset property="jdk1.4+"/> - <isset property="apache.regexp.present"/> - <isset property="apache.oro.present"/> - </or> - </condition> - - <target name="testname1"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <resource name="foo" /> - <resource name="bar" /> - <resource name="baz" /> - <resource name="boo" /> - <resource name="bang" /> - </resources> - <rsel:name name="ba?" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testname2"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <file file="foo" /> - <resource name="foo" /> - <file file="foo" basedir="${basedir}" /> - </resources> - <rsel:name name="foo" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="name" depends="testname1,testname2" /> - - <target name="testexists"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <file file="idonotexist" /> - <resource name="foo" /> - <resource name="foo" exists="false" /> - </resources> - <rsel:exists /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testinstanceoftype1"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <file file="foo" /> - <url url="http://ant.apache.org/index.html" /> - <resource name="foo" /> - <string value="foo" /> - <file file="bar" /> - </resources> - <rsel:instanceof type="file" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testinstanceoftype2"> - <typedef name="file" uri="test" - classname="org.apache.tools.ant.types.resources.FileResource" /> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <url file="foo" /> - <file file="bar" xmlns="test" /> - </resources> - <rsel:instanceof type="test:file" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testinstanceoftype3"> - <typedef name="file" uri="test" - classname="org.apache.tools.ant.types.resources.FileResource" /> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <url file="foo" /> - <file file="bar" xmlns="test" /> - </resources> - <rsel:instanceof type="file" uri="test" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="instanceoftype" - depends="testinstanceoftype1,testinstanceoftype2,testinstanceoftype3" /> - - <target name="testinstanceofclass"> - <au:assertTrue> - <resourcecount when="equal" count="7"> - <restrict> - <resources> - <filelist dir="${basedir}" files="a,b,c,d,e,f,g" /> - </resources> - <rsel:instanceof class="org.apache.tools.ant.types.Resource" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="instanceof" depends="instanceoftype,testinstanceofclass" /> - - <target name="testtype"> - <resources id="testtype"> - <file file="${basedir}" /> - <file file="${ant.file}" /> - <resource directory="true" /> - <resource directory="false" /> - </resources> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources refid="testtype" /> - <rsel:type type="dir" /> - </restrict> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources refid="testtype" /> - <rsel:type type="file" /> - </restrict> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="4"> - <restrict> - <resources refid="testtype" /> - <rsel:type type="any" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testdate"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <resource lastmodified="4" /> - <resource lastmodified="5" /> - <resource lastmodified="6" /> - <resource lastmodified="7" /> - <resource lastmodified="8" /> - </resources> - <rsel:date when="after" millis="5" granularity="0" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testsize"> - <au:assertTrue> - <resourcecount when="equal" count="4"> - <restrict> - <resources> - <resource size="4" /> - <resource size="5" /> - <resource size="6" /> - <resource size="7" /> - <resource size="8" /> - </resources> - <rsel:size when="le" size="7" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testand"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <and xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - </and> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testor"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <or xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - </or> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testnot"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <not xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <size size="3" /> - </not> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testnone"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <none xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - </none> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testmajority1"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <majority xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - <instanceof type="string" /> - </majority> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testmajority2"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <majority xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - <instanceof type="resource" /> - </majority> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testmajority3"> - <au:assertTrue> - <resourcecount when="equal" count="3"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <majority allowtie="true" - xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - <instanceof type="string" /> - <exists /> - </majority> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testmajority4"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="fee" /> - <resource name="fi" size="3" /> - <resource name="fo" /> - <resource name="fum" /> - </resources> - <majority allowtie="false" - xmlns="antlib:org.apache.tools.ant.types.resources.selectors"> - <name name="f?" /> - <size size="3" /> - <instanceof type="string" /> - <exists /> - </majority> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testcontains"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </resources> - <contains text="b" - xmlns="antlib:org.apache.tools.ant.types.resources.selectors" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testcontainsregexp" if="some.regexp.support"> - <au:assertTrue> - <resourcecount when="equal" count="2"> - <restrict> - <resources> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </resources> - <containsregexp expression="^b..$" - xmlns="antlib:org.apache.tools.ant.types.resources.selectors" /> - </restrict> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testcompare"> - <au:assertTrue> - <and> - <!-- basic test, natural ordering --> - <resourcecount count="3"> - <restrict> - <rsel:compare when="greater" against="each"> - <control><string value="b" /></control> - </rsel:compare> - <resources> - <string value="a" /> - <string value="b" /> - <string value="c" /> - <string value="d" /> - <string value="e" /> - </resources> - </restrict> - </resourcecount> - <!-- one comparator, default when/against --> - <resourcecount count="5"> - <restrict> - <rsel:compare> - <control><string value="." /></control> - <rcmp:size /> - </rsel:compare> - <resources> - <string value="a" /> - <string value="b" /> - <string value="c" /> - <string value="d" /> - <string value="e" /> - </resources> - </restrict> - </resourcecount> - <!-- multiple controls, comparators --> - <resourcecount count="3"> - <restrict> - <rsel:compare when="greater" against="each"> - <control> - <string value="a" /> - <string value="b" /> - <string value="bb" /> - <string value="c" /> - <string value="ccc" /> - </control> - <rcmp:name /> - <rcmp:size /> - </rsel:compare> - <resources> - <string value="a" /> - <string value="bbbb" /> - <string value="ccc" /> - <string value="cccc" /> - <string value="d" /> - <string value="e" /> - </resources> - </restrict> - </resourcecount> - </and> - </au:assertTrue> - </target> - - <target name="majority" - depends="testmajority1,testmajority2,testmajority3,testmajority4" /> - - <target name="logical" - depends="testand,testor,testnone,testnot,majority" /> - - <target name="all" - depends="name,testexists,instanceof,testtype,testdate,testsize,testcontains,testcontainsregexp,logical,testcompare" /> - - <!-- - The tests for oata.types.selectors.ModifiedSelectorTest as - ResourceSelector are in its test-buildfile src\etc\testcases\types\selectors.xml. - --> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/test.xml deleted file mode 100644 index 5af37b9a..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/test.xml +++ /dev/null @@ -1,460 +0,0 @@ -<?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" /> - - <property name="dirname" value="work" /> - <property name="dir" location="${output}/${dirname}" /> - <property name="zip" location="${output}/${dirname}.zip" /> - <property name="jar" location="${antunit.tmpdir}/${dirname}.jar" /> - <property name="file" location="${output}/${dirname}/file.txt" /> - - <condition property="offline"> - <not> - <or> - <http url="http://www.apache.org"/> - <http url="http://www.google.com"/> - </or> - </not> - </condition> - - <target name="setUp"> - - <touch mkdirs="true"> - <filelist dir="${dir}/foo/a" files="x,y,z" /> - </touch> - - <copy todir="${dir}/foo" enablemultiplemappings="true"> - <fileset dir="${dir}/foo" /> - <mapper> - <globmapper handledirsep="true" from="a/*" to="b/*" /> - <globmapper handledirsep="true" from="a/*" to="c/*" /> - </mapper> - </copy> - - <copy todir="${dir}/bar"> - <fileset dir="${dir}/foo" /> - </copy> - - <property name="foo" location="${dir}/foo" /> - <property name="foo.a" location="${dir}/foo/a" /> - <property name="foo.b" location="${dir}/foo/b" /> - <property name="foo.c" location="${dir}/foo/c" /> - - <property name="bar" location="${dir}/bar" /> - <property name="bar.a" location="${dir}/bar/a" /> - <property name="bar.b" location="${dir}/bar/b" /> - <property name="bar.c" location="${dir}/bar/c" /> - </target> - - <target name="tearDown"> - <delete dir="${dir}" /> - <delete file="${zip}" /> - <delete file="${jar}" deleteonexit="true" /> - <delete file="${file}" /> - </target> - - <target name="testfiles1" depends="setUp"> - <au:assertTrue> - <resourcecount count="26"> - <files> - <include name="${dir}/foo/" /> - <include name="${dir}/bar/" /> - </files> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfiles2" depends="setUp"> - <au:assertTrue> - <resourcecount count="8"> - <files> - <include name="${dir}/foo/" /> - <include name="${dir}/bar/" /> - <type type="dir" /> - </files> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfiles3" depends="setUp"> - <au:assertTrue> - <resourcecount count="18"> - <files> - <include name="${dir}/foo/" /> - <include name="${dir}/bar/" /> - <type type="file" /> - </files> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testnestedresources" depends="setUp"> - <au:assertTrue> - <resourcecount count="27"><!-- include duplicates! --> - <resources> - <files> - <include name="${dir}/foo/" /> - <include name="${dir}/bar/" /> - <type type="file" /> - </files> - <files> - <include name="${dir}/foo/" /> - <type type="file" /> - </files> - </resources> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testresourcesref" depends="setUp"> - <files id="files"> - <include name="${dir}/foo/" /> - <include name="${dir}/bar/" /> - <type type="file" /> - </files> - <au:assertTrue> - <resourcecount count="18"> - <resources refid="files" /> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfileset" depends="setUp"> - <au:assertTrue> - <resourcecount count="9"> - <fileset dir="${dir}/foo" /> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testdirset" depends="setUp"> - <au:assertTrue> - <resourcecount count="4"> - <dirset dir="${dir}/foo" /> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfilelist"> - <au:assertTrue> - <resourcecount count="5"> - <filelist dir="${dir}/foo" files="1,2,3,4,5" /> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testpath" depends="setUp"> - <au:assertTrue> - <resourcecount count="24"> - <path> - <path id="p"> - <fileset id="fs" dir="${foo.a}" /> <!-- 3 --> - <dirset id="ds" dir="${foo}" /> <!-- 4 --> - </path> - <pathelement id="pe" location="${dir}" /> <!-- 1 --> - <filelist id="fl" dir="${bar}" files="1,2,3,a,b,c" /> <!-- 6 --> - <files id="f"> <!-- 13; 3 overlap fl --> - <include name="${bar}/"/> - </files> - </path> - </resourcecount> - </au:assertTrue> - </target> - - <target name="createzip" depends="setUp"> - <zip destfile="${zip}" basedir="${dir}" /> - </target> - - <target name="testzipfileset" depends="createzip"> - <au:assertTrue> - <resourcecount count="9"> - <zipfileset src="${zip}" includes="foo/" /> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testpropertyset"> - <property name="testpropertyset.a" value="a" /> - <property name="testpropertyset.aa" value="aa" /> - <property name="testpropertyset.aaa" value="aaa" /> - <propertyset id="testpropertyset"> - <propertyref prefix="testpropertyset." /> - </propertyset> - <au:assertTrue> - <and> - <resourcecount refid="testpropertyset" count="3" /> - <length length="12"> - <resources> - <resources refid="testpropertyset" /> - <propertyset refid="testpropertyset" /> - </resources> - </length> - </and> - </au:assertTrue> - </target> - - <target name="testunion" depends="setUp"> - <au:assertTrue> - <resourcecount count="4"> - <union> - <files> <!-- 1 --> - <include name="${foo.a}/w"/> - <include name="${foo.a}/x"/> - </files> - <fileset dir="${foo.a}" includes="x,y" /> <!-- 2; net 1 --> - <filelist dir="${foo.a}" files="v" /> <!-- 1 --> - <files> <!-- 2; net 1 --> - <include name="${foo.a}/y"/> - <include name="${foo.a}/z"/> - </files> - </union> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testintersect"> - <au:assertTrue> - <resourcecount count="3"> - <intersect> - <filelist dir="${dir}" files="1,2,3,4,5" /> - <filelist dir="${dir}" files="2,3,4,5,6" /> - <filelist dir="${dir}" files="3,4,5,6,7" /> - </intersect> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testdifference"> - <au:assertTrue> - <resourcecount count="2"> - <difference id="diff"> - <filelist dir="${dir}" files="1,2,3,4,5" /> - <filelist dir="${dir}" files="2,3,4,5,6" /> - <filelist dir="${dir}" files="3,4,5,6,7" /> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfileurl"> - <au:assertTrue> - <length when="greater" length="0"> - <url file="${ant.file}" /> - </length> - </au:assertTrue> - </target> - - <target name="testfileurlref"> - <url id="fileurl" file="${ant.file}" /> - <au:assertTrue> - <length when="greater" length="0"> - <url refid="fileurl" /> - </length> - </au:assertTrue> - </target> - - <target name="testhttpurl1" unless="offline"> - <au:assertTrue> - <length when="greater" length="0"> - <url url="http://www.w3.org/MarkUp/" /> - </length> - </au:assertTrue> - </target> - - <target name="testhttpurl2" unless="offline"> - <concat destfile="${file}" force="true" append="false"> - <url id="httpurl" url="http://ant.apache.org/index.html" /> - <url refid="httpurl" /> - </concat> - <length property="httpurl.length"> - <url refid="httpurl" /> - </length> - <length property="file.length"> - <file file="${file}"/> - </length> - <au:assertTrue message="length of url ${httpurl.length} length of file ${file.length} file should be twice as big"> - <length file="${file}" when="greater" length="${httpurl.length}" /> - </au:assertTrue> - </target> - - <target name="createjar" depends="setUp"> - <jar destfile="${jar}" basedir="${dir}" /> - </target> - - <target name="testjarurl" depends="createjar"> - <pathconvert property="jarurl"> - <url file="${jar}" /> - </pathconvert> - <au:assertTrue> - <length when="greater" length="0"> - <url url="jar:${jarurl}!/META-INF/MANIFEST.MF" /> - </length> - </au:assertTrue> - </target> - - <target name="testfile" depends="setUp"> - <echo file="${file}">This is a test.</echo> - <au:assertTrue> - <length length="15"> - <file file="${file}" /> - </length> - </au:assertTrue> - </target> - - <target name="testzipentry" depends="createjar"> - <au:assertTrue> - <length when="greater" length="0"> - <zipentry zipfile="${jar}" name="META-INF/MANIFEST.MF" /> - </length> - </au:assertTrue> - </target> - - <target name="teststring1"> - <au:assertTrue> - <length length="15"> - <string value="This is a test." /> - </length> - </au:assertTrue> - </target> - - <target name="teststring2"> - <property name="test" value="foo" /> - <au:assertTrue> - <length length="14"> - <string value="This is a ${test}." /> - </length> - </au:assertTrue> - </target> - - <target name="testresource"> - <au:assertTrue> - <length length="4096"> - <resource size="4096" /> - </length> - </au:assertTrue> - </target> - - <target name="testproperty"> - <property name="testproperty" value="abcdefghij" /> - <au:assertTrue> - <length length="10"> - <propertyresource name="testproperty" /> - </length> - </au:assertTrue> - </target> - - <target name="testPropertyResolvedAsResource"> - <string id="s" value="abcdefghij" /> - <au:assertTrue> - <resourcesmatch> - <resource refid="s" /> - <propertyresource name="ant.refid:s" /> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testfirst0"> - <au:assertTrue> - <resourcecount count="0"> - <first count="0"> - <filelist dir="${dir}" files="1,2,3,4,5" /> - </first> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfirst1"> - <au:assertTrue> - <resourcecount count="1"> - <first> - <filelist dir="${dir}" files="1,2,3,4,5" /> - </first> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testfirst2"> - <au:assertTrue> - <resourcecount count="2"> - <first count="2"> - <filelist dir="${dir}" files="1,2,3,4,5" /> - </first> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testJavaConstant"> - <property name="test.tmp.dir" value="${antunit.tmpdir}/testJavaConstant"/> - <mkdir dir="${test.tmp.dir}"/> - <echo file="${test.tmp.dir}/SomeClass.java"> - public class SomeClass { - public static final String CONSTANT = "constant"; - public final String NOT_STATIC = "not-static"; - private static final String PRIVATE = "private"; - } - </echo> - <javac srcdir="${test.tmp.dir}" destdir="${test.tmp.dir}"/> - <path id="tmp.cp"> - <pathelement location="${test.tmp.dir}"/> - </path> - - <loadresource property="actual"> - <javaconstant name="org.apache.tools.ant.Main.DEFAULT_BUILD_FILENAME"/> - </loadresource> - <au:assertEquals message="could not read java constant" expected="build.xml" actual="${actual}" /> - - <!-- - We can't test for special error messages using built-in tasks - because they catch these messages - --> - <au:expectfailure> - <loadresource property="p"> - <javaconstant/> - </loadresource> - </au:expectfailure> - <au:expectfailure> - <loadresource property="p"> - <javaconstant name="org.apache.tools.ant.MissingClass"/> - </loadresource> - </au:expectfailure> - <au:expectfailure> - <loadresource property="p"> - <javaconstant name="SomeClass.CONSTANT2" classpathref="tmp.cp"/> - </loadresource> - </au:expectfailure> - <au:expectfailure> - <loadresource property="p"> - <javaconstant name="SomeClass.PRIVATE"> - <classpath> - <pathelement location="${test.tmp.dir}"/> - </classpath> - </javaconstant> - </loadresource> - </au:expectfailure> - <au:expectfailure> - <loadresource property="p"> - <javaconstant name="SomeClass.NOT_STATIC"/> - </loadresource> - </au:expectfailure> - - <delete dir="${test.tmp.dir}"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/tokens-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/tokens-test.xml deleted file mode 100644 index c09d604c..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/tokens-test.xml +++ /dev/null @@ -1,128 +0,0 @@ -<?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 name="test-tokens" default="antunit" - xmlns:au="antlib:org.apache.ant.antunit"> - - <property name="eol" value="${line.separator}" /> - - <target name="antunit"> - <au:antunit> - <au:plainlistener /> - <file file="${ant.file}" /> - </au:antunit> - </target> - - <target name="testLines"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <tokens> - <string value="foo${eol}bar${eol}baz" /> - </tokens> - <resources> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testExplicitLines"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <tokens> - <string value="foo${eol}bar${eol}baz" /> - <linetokenizer /> - </tokens> - <resources> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testFileTokenizer"> - <au:assertTrue> - <resourcecount count="1"> - <tokens> - <resources> - <string value="foo${eol}bar${eol}baz" /> - <file file="${ant.file}" /> - </resources> - <filetokenizer /> - </tokens> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testStringTokenizer"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <tokens> - <string value="foo bar baz " /> - <stringtokenizer /> - </tokens> - <resources> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testEncoding"> - <au:assertTrue> - <resourcecount count="0"> - <difference> - <tokens encoding="utf-16"> - <file file="utf-16.in" /> - </tokens> - <resources> - <string value="foo" /> - <string value="bar" /> - <string value="baz" /> - </resources> - </difference> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testSort"> - <pathconvert property="sorted" pathsep="${eol}"> - <sort> - <tokens> - <string value="foo bar etc baz" /> - <stringtokenizer /> - </tokens> - </sort> - </pathconvert> - <au:assertTrue> - <equals arg1="bar${eol}baz${eol}etc${eol}foo" arg2="${sorted}" /> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/utf-16.in b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/utf-16.in Binary files differdeleted file mode 100644 index 7c7c2a78..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/resources/utf-16.in +++ /dev/null diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/depend-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/depend-test.xml deleted file mode 100644 index e868f6a6..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/depend-test.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?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" /> - - <property name="output.dir" location="output" /> - <property name="foo.file" location="${output.dir}/foo" /> - - <target name="setUp"> - <touch file="${foo.file}" mkdirs="true" /> - </target> - - <target name="tearDown"> - <delete dir="${output.dir}" /> - </target> - - <target name="testMapperByTypedef" depends="setUp"> - <au:assertTrue> - <resourcecount count="1"> - <fileset file="${foo.file}"> - <depend targetdir="${basedir}"><!-- dummy targetdir --> - <mergemapper to="${ant.file}" /> - </depend> - </fileset> - </resourcecount> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/different-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/different-test.xml deleted file mode 100644 index c2542d2f..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/different-test.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?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" /> - - <property name="output.dir" location="output" /> - <property name="foo.file" location="${output.dir}/foo" /> - - <target name="setUp"> - <mkdir dir="${output.dir}"/> - <echo file="${foo.file}">foo</echo> - </target> - - <target name="tearDown"> - <delete dir="${output.dir}" /> - </target> - - <target name="testMapperByTypedef" depends="setUp"> - <au:assertTrue> - <resourcecount count="1"> - <fileset file="${foo.file}"> - <different targetdir="${basedir}"><!-- dummy targetdir --> - <mergemapper to="${ant.file}" /> - </different> - </fileset> - </resourcecount> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/filename-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/filename-test.xml deleted file mode 100644 index 3f28e11e..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/filename-test.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?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" /> - - <property name="file" value="testfile"/> - - <target name="createTestdir"> - <mkdir dir="${output}"/> - <touch file="${output}/${file}"/> - </target> - - <target name="testPattern" depends="createTestdir"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <fileset dir="${output}"> - <filename name="*"/> - </fileset> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <fileset dir="${output}"> - <filename name="*" negate="true"/> - </fileset> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <fileset dir="${output}"> - <filename name=".*"/> - </fileset> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testRegex" depends="createTestdir"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <fileset dir="${output}"> - <filename regex=".*"/> - </fileset> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <fileset dir="${output}"> - <filename regex=".*" negate="true"/> - </fileset> - </resourcecount> - </au:assertTrue> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/modified-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/modified-test.xml deleted file mode 100644 index a4c43e04..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/modified-test.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?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="tearDown" depends="antunit-base.tearDown"> - <delete file="cache.properties" quiet="true"/> - </target> - - <target name="testUpdate" - description="https://issues.apache.org/bugzilla/show_bug.cgi?id=32597"> - <mkdir dir="${input}"/> - <touch file="${input}/A"/> - <mkdir dir="${output}"/> - <pathconvert> - <fileset dir="${input}"> - <modified/> - </fileset> - </pathconvert> - <au:assertFileExists file="cache.properties"/> - <copy todir="${output}" file="cache.properties"/> - <echo file="${input}/A">Hello</echo> - <pathconvert> - <fileset dir="${input}"> - <modified update="false"/> - </fileset> - </pathconvert> - <au:assertFilesMatch - expected="${output}/cache.properties" - actual="cache.properties"/> - <pathconvert> - <fileset dir="${input}"> - <modified> - <param name="update" value="false"/> - </modified> - </fileset> - </pathconvert> - <au:assertFilesMatch - expected="${output}/cache.properties" - actual="cache.properties"/> - <pathconvert> - <fileset dir="${input}"> - <modified update="true"/> - </fileset> - </pathconvert> - <au:assertFilesDiffer - expected="${output}/cache.properties" - actual="cache.properties"/> - <copy todir="${output}" file="cache.properties"/> - <echo file="${input}/A">world</echo> - <pathconvert> - <fileset dir="${input}"> - <modified update="true"/> - </fileset> - </pathconvert> - <au:assertFilesDiffer - expected="${output}/cache.properties" - actual="cache.properties"/> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/present-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/present-test.xml deleted file mode 100644 index e31c722d..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/present-test.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?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" /> - - <property name="output.dir" location="output" /> - <property name="foo.file" location="${output.dir}/foo" /> - - <target name="setUp"> - <touch file="${foo.file}" mkdirs="true" /> - </target> - - <target name="tearDown"> - <delete dir="${output.dir}" /> - </target> - - <target name="testMapperByTypedef" depends="setUp"> - <au:assertTrue> - <resourcecount count="1"> - <fileset file="${foo.file}"> - <present targetdir="${basedir}"><!-- dummy targetdir --> - <mergemapper to="${ant.file}" /> - </present> - </fileset> - </resourcecount> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/readwrite-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/readwrite-test.xml deleted file mode 100644 index bd4ac8de..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/readwrite-test.xml +++ /dev/null @@ -1,99 +0,0 @@ -<?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" /> - - <property name="file" value="testfile"/> - - <condition property="unix"> - <os family="unix"/> - </condition> - - <target name="createTestdir"> - <mkdir dir="${output}"/> - <touch file="${output}/${file}"/> - </target> - - <target name="testReadable" depends="createTestdir"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <fileset dir="${output}"> - <readable/> - </fileset> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <fileset dir="${output}" excludes="${file}"> - <readable/> - </fileset> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testWritable" depends="createTestdir"> - <au:assertTrue> - <resourcecount when="equal" count="1"> - <fileset dir="${output}"> - <writable/> - </fileset> - </resourcecount> - </au:assertTrue> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <fileset dir="${output}" excludes="${file}"> - <writable/> - </fileset> - </resourcecount> - </au:assertTrue> - </target> - - <target name="makeFileUnwritable" - depends="createTestdir,makeFileUnwritable-Unix,makeFileUnwritable-Windows"/> - <target name="makeFileUnwritable-Unix" id="unix"> - <chmod file="${output}/${file}" perm="444"/> - </target> - <target name="makeFileUnwritable-Windows" unless="unix"> - <attrib file="${output}/${file}" readonly="true"/> - </target> - - <target name="testUnwritable" depends="makeFileUnwritable"> - <au:assertTrue> - <resourcecount when="equal" count="0"> - <fileset dir="${output}"> - <writable/> - </fileset> - </resourcecount> - </au:assertTrue> - </target> - - <target name="testAsConditions" depends="makeFileUnwritable"> - <au:assertTrue> - <isfileselected file="${output}/${file}"> - <readable/> - </isfileselected> - </au:assertTrue> - <au:assertFalse> - <isfileselected file="${output}/${file}"> - <writable/> - </isfileselected> - </au:assertFalse> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/select-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/select-test.xml deleted file mode 100644 index f5f5b99e..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/selectors/select-test.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?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"> - <mkdir dir="${input}"/> - <touch file="${input}/A"/> - <touch file="${input}/B"/> - <touch file="${input}/C"/> - <touch file="${input}/D"/> - <mkdir dir="${output}"/> - <macrodef name="cp"> - <sequential> - <copy todir="${output}"> - <fileset dir="${input}"> - <or> - <selector if="${if}"> - <filename name="A"/> - </selector> - <selector unless="${if}"> - <filename name="B"/> - </selector> - <selector if="if"> - <filename name="C"/> - </selector> - <selector unless="if"> - <filename name="D"/> - </selector> - </or> - </fileset> - </copy> - </sequential> - </macrodef> - </target> - - <target name="testIfNotSet" depends="setUp"> - <cp/> - <au:assertFileDoesntExist file="${output}/C"/> - <au:assertFileExists file="${output}/D"/> - <au:assertFileDoesntExist file="${output}/A"/> - <au:assertFileExists file="${output}/B"/> - </target> - - <target name="testIfSet" depends="setUp"> - <property name="if" value="whatever"/> - <cp/> - <au:assertFileDoesntExist file="${output}/A"/> - <au:assertFileExists file="${output}/B"/> - <au:assertFileExists file="${output}/C"/> - <au:assertFileDoesntExist file="${output}/D"/> - </target> - - <target name="testIfTrue" depends="setUp"> - <property name="if" value="true"/> - <cp/> - <au:assertFileExists file="${output}/A"/> - <au:assertFileDoesntExist file="${output}/B"/> - <au:assertFileExists file="${output}/C"/> - <au:assertFileDoesntExist file="${output}/D"/> - </target> - - <target name="testIfFalse" depends="setUp"> - <property name="if" value="false"/> - <cp/> - <au:assertFileDoesntExist file="${output}/A"/> - <au:assertFileExists file="${output}/B"/> - <au:assertFileExists file="${output}/C"/> - <au:assertFileDoesntExist file="${output}/D"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/tarfileset-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/tarfileset-test.xml deleted file mode 100644 index 3c4d3a98..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/tarfileset-test.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?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="testMissingArchive"> - <mkdir dir="${output}"/> - <au:expectfailure expectedMessage="The archive foo.tar doesn't exist"> - <copy todir="${output}"> - <tarfileset src="foo.tar"/> - </copy> - </au:expectfailure> - </target> - - <target name="testMissingArchiveDoesntMatter"> - <mkdir dir="${output}"/> - <copy todir="${output}"> - <tarfileset src="foo.tar" errorOnMissingArchive="false"/> - </copy> - </target> - - <target name="test-refid-check-encoding"> - <tarfileset id="test-refid2" - encoding="utf-8" - dir="${basedir}"/> - <au:expectfailure> - <tarfileset id="ref4" - encoding="utf-8" - refid="test-refid2"/> - </au:expectfailure> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/zipfileset-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/zipfileset-test.xml deleted file mode 100644 index c8bb022b..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/types/zipfileset-test.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?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="test-refid-modify"> - <fileset id="modify-refid-1" - dir="${basedir}" - includes="*.xml" - /> - <zipfileset id="modify-refid-2" - refid="modify-refid-1" - prefix="WEB-INF/lib/"/> - <delete quiet="yes" dir="${build.dir}"/> - <mkdir dir="${output}"/> - <jar jarfile="${output}/jar.jar"> - <zipfileset refid="modify-refid-2"/> - </jar> - <unjar src="${output}/jar.jar" - dest="${output}"/> - <au:assertTrue> - <available file="${output}/WEB-INF/lib/zipfileset-test.xml"/> - </au:assertTrue> - </target> - - <target name="test-refid-check-prefix"> - <zipfileset id="test-refid" - dir="${basedir}"/> - <au:expectfailure> - <zipfileset id="ref2" - refid="test-refid" - prefix="WEB-INF/lib/"/> - </au:expectfailure> - <au:expectfailure> - <zipfileset id="ref3" - prefix="WEB-INF/lib/" - ReFiD="test-refid"/> - </au:expectfailure> - </target> - - <target name="test-refid-check-encoding"> - <zipfileset id="test-refid2" - encoding="utf-8" - dir="${basedir}"/> - <au:expectfailure> - <zipfileset id="ref4" - encoding="utf-8" - refid="test-refid2"/> - </au:expectfailure> - </target> - - <target name="testMissingArchive"> - <mkdir dir="${output}"/> - <au:expectfailure expectedMessage="The archive foo.zip doesn't exist"> - <copy todir="${output}"> - <zipfileset src="foo.zip"/> - </copy> - </au:expectfailure> - </target> - - <target name="testMissingArchiveDoesntMatter"> - <mkdir dir="${output}"/> - <copy todir="${output}"> - <zipfileset src="foo.zip" errorOnMissingArchive="false"/> - </copy> - </target> - -</project> |