diff options
Diffstat (limited to 'framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters')
15 files changed, 0 insertions, 551 deletions
diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expandproperties-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expandproperties-test.xml deleted file mode 100644 index 5dff8320..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expandproperties-test.xml +++ /dev/null @@ -1,92 +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="foo" value="FOO" /> - <property name="bar" value="BAR" /> - <property name="baz" value="BAZ" /> - - <target name="testClassic"> - <au:assertTrue> - <resourcesmatch> - <string value="FOO BAR BAZ" /> - <concat> - <string value="$${foo} $${bar} $${baz}" /> - <filterchain> - <expandproperties /> - </filterchain> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testSubset"> - <au:assertTrue> - <resourcesmatch> - <string value="FOO $${bar} BAZ" /> - <concat> - <string value="$${foo} $${bar} $${baz}" /> - <filterchain> - <expandproperties> - <propertyset> - <propertyref name="foo" /> - <propertyref name="baz" /> - </propertyset> - </expandproperties> - </filterchain> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testMappedPropertySet"> - <au:assertTrue> - <resourcesmatch> - <string value="FOO BAR BAZ" /> - <concat> - <string value="$${food} $${bard} $${bazd}" /> - <filterchain> - <expandproperties> - <propertyset> - <propertyref builtin="all" /> - <globmapper from="*" to="*d" /> - </propertyset> - </expandproperties> - </filterchain> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - - <target name="testEmptyResource" - description="https://issues.apache.org/bugzilla/show_bug.cgi?id=53626"> - <au:assertTrue> - <resourcesmatch> - <string value="" /> - <concat> - <string value="" /> - <filterchain> - <expandproperties /> - </filterchain> - </concat> - </resourcesmatch> - </au:assertTrue> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortComparator.test b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortComparator.test deleted file mode 100644 index a93e4f48..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortComparator.test +++ /dev/null @@ -1,10 +0,0 @@ -Line 2 -Line 4 -Line 6 -Line 8 -Line 10 -Line 1 -Line 3 -Line 5 -Line 7 -Line 9 diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortDefault.test b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortDefault.test deleted file mode 100644 index 43d44e57..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortDefault.test +++ /dev/null @@ -1,10 +0,0 @@ -Line 1 -Line 2 -Line 3 -Line 4 -Line 5 -Line 6 -Line 7 -Line 8 -Line 9 -Line 10 diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortReverse.test b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortReverse.test deleted file mode 100644 index a847cc10..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sort.sortReverse.test +++ /dev/null @@ -1,10 +0,0 @@ -Line 10 -Line 9 -Line 8 -Line 7 -Line 6 -Line 5 -Line 4 -Line 3 -Line 2 -Line 1 diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sortuniq.txt b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sortuniq.txt deleted file mode 100644 index 7dc51acc..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/sortuniq.txt +++ /dev/null @@ -1,4 +0,0 @@ -A -AA -B -C diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/uniq.txt b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/uniq.txt deleted file mode 100644 index e9d0f3db..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/uniq.txt +++ /dev/null @@ -1,5 +0,0 @@ -A -AA -B -C -B diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/unique-columns.txt b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/unique-columns.txt deleted file mode 100644 index 81f684e7..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/expected/unique-columns.txt +++ /dev/null @@ -1 +0,0 @@ -A B C B diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/sort.sortDefault.test b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/sort.sortDefault.test deleted file mode 100644 index 05661185..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/sort.sortDefault.test +++ /dev/null @@ -1,10 +0,0 @@ -Line 10 -Line 1 -Line 9 -Line 6 -Line 3 -Line 2 -Line 4 -Line 5 -Line 7 -Line 8 diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/uniq.txt b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/uniq.txt deleted file mode 100644 index 9baebe55..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/uniq.txt +++ /dev/null @@ -1,6 +0,0 @@ -A -AA -AA -B -C -B diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/unique-columns.txt b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/unique-columns.txt deleted file mode 100644 index ef797259..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/input/unique-columns.txt +++ /dev/null @@ -1 +0,0 @@ -A A B C B diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/replacetokens-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/replacetokens-test.xml deleted file mode 100644 index c1f98ab6..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/replacetokens-test.xml +++ /dev/null @@ -1,68 +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" /> - - <import file="../propertyhelpers.xml" as="ph"/> - - <target name="tearDown" depends="antunit-base.tearDown"> - <delete dir="foo"/> - </target> - - <target name="setUp"> - <mkdir dir="${input}"/> - <echo file="${input}/text.txt"><![CDATA[ -Hello, @world@! -]]></echo> - </target> - - <target name="testPropertiesResource" depends="setUp,ph.defineHelpers"> - <mkdir dir="${output}"/> - <mkdir dir="foo"/> - <echo file="foo/foo.properties"><![CDATA[ -world=Ant -]]></echo> - <copy todir="${output}"> - <fileset dir="${input}"/> - <filterchain> - <replacetokens propertiesResource="${java:foo!foo.properties}"/> - </filterchain> - </copy> - <au:assertResourceContains - resource="${output}/text.txt" value="Hello, Ant!"/> - </target> - - <target name="testFileEndsWithToken" - description="https://issues.apache.org/bugzilla/show_bug.cgi?id=47306" - depends="setUp"> - <mkdir dir="${output}"/> - <echo file="${input}/test47306.txt">Hello@</echo> - <copy todir="${output}"> - <fileset dir="${input}"/> - <filterchain> - <replacetokens> - <token key="foo" value="bar"/> - </replacetokens> - </filterchain> - </copy> - <au:assertFilesMatch - expected="${input}/test47306.txt" - actual="${output}/test47306.txt"/> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/sort-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/sort-test.xml deleted file mode 100644 index 8c2a88b5..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/sort-test.xml +++ /dev/null @@ -1,126 +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="${output}"/> - </target> - - <target name="testSortFilterNoArgs" depends="setUp"> - <copy file="input/sort.sortDefault.test" - tofile="${output}/sort.sortDefault.test"> - <filterchain> - <sortfilter/> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/sort.sortDefault.test" - actual="${output}/sort.sortDefault.test"/> - </target> - - <target name="testSortFilterNoArgsLong" depends="setUp"> - <copy file="input/sort.sortDefault.test" - tofile="${output}/sort.sortDefault.test"> - <filterchain> - <filterreader classname="org.apache.tools.ant.filters.SortFilter"/> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/sort.sortDefault.test" - actual="${output}/sort.sortDefault.test"/> - </target> - - <target name="testSortFilterReverse" depends="setUp"> - <copy file="input/sort.sortDefault.test" - tofile="${output}/sort.sortReverse.test"> - <filterchain> - <sortfilter reverse="true"/> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/sort.sortReverse.test" - actual="${output}/sort.sortReverse.test"/> - </target> - - <target name="testSortFilterReverseLong" depends="setUp"> - <copy file="input/sort.sortDefault.test" - tofile="${output}/sort.sortReverse.test"> - <filterchain> - <filterreader classname="org.apache.tools.ant.filters.SortFilter"> - <param name="reverse" value="true"/> - </filterreader> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/sort.sortReverse.test" - actual="${output}/sort.sortReverse.test"/> - </target> - - <target name="-setUpEvenFirst" depends="setUp"> - <mkdir dir="${input}/src/org/apache/tools/ant/filters"/> - <echo file="${input}/src/org/apache/tools/ant/filters/EvenFirstCmp.java"><![CDATA[ -package org.apache.tools.ant.filters; - -import java.util.Comparator; - -public final class EvenFirstCmp implements Comparator { - - public int compare(Object o1, Object o2) { - String s1 = ((String) o1).substring(5).trim(); - String s2 = ((String) o2).substring(5).trim(); - int n1 = Integer.parseInt(s1); - int n2 = Integer.parseInt(s2); - if (n1 % 2 == 0) { - if (n2 % 2 == 0) { - return n1 - n2; - } else { - return -1; - } - } else { - if (n2 % 2 == 0) { - return 1; - } else { - return n1 - n2; - } - } - } -} -]]></echo> - <mkdir dir="${input}/build"/> - <javac srcdir="${input}/src" destdir="${input}/build"/> - <typedef classname="org.apache.tools.ant.filters.EvenFirstCmp" - name="evenfirst"> - <classpath location="${input}/build"/> - </typedef> - </target> - - <target name="testSortFilterComparator" depends="-setUpEvenFirst"> - <copy file="input/sort.sortDefault.test" - tofile="${output}/sort.sortComparator.test"> - <filterchain> - <sortfilter> - <evenfirst/> - </sortfilter> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/sort.sortComparator.test" - actual="${output}/sort.sortComparator.test"/> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/striplinecomments-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/striplinecomments-test.xml deleted file mode 100644 index 2af0f013..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/striplinecomments-test.xml +++ /dev/null @@ -1,85 +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="br" value="${line.separator}" /> - - <string id="input">foo -#pound -bar -//java sl -baz -REMark -</string> - - <macrodef name="test"> - <attribute name="lines" /> - <element name="comments" implicit="true" /> - <sequential> - <au:assertTrue> - <resourcecount count="@{lines}"> - <tokens> - <concat> - <resource refid="input" /> - <filterchain> - <striplinecomments> - <comments /> - </striplinecomments> - <ignoreblank /> - </filterchain> - </concat> - </tokens> - </resourcecount> - </au:assertTrue> - </sequential> - </macrodef> - - <target name="testBasic"> - <test lines="5"> - <comment value="#" /> - </test> - </target> - - <target name="testMultiple"> - <test lines="3"> - <comment value="#" /> - <comment value="//" /> - <comment value="REM" /> - </test> - </target> - - <target name="testNestedText"> - <test lines="3"> - <comment>#</comment> - <comment>//</comment> - <comment>REM</comment> - </test> - </target> - - <target name="testExclusivity"> - <au:expectfailure> - <filterchain> - <striplinecomments> - <comment value="#">#"</comment> - </striplinecomments> - </filterchain> - </au:expectfailure> - </target> - -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/suffix-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/suffix-test.xml deleted file mode 100644 index a0a9403c..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/suffix-test.xml +++ /dev/null @@ -1,42 +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="${input}"/> - <mkdir dir="${output}"/> - </target> - - <target name="testSimple"> - <echo file="${input}/a.txt">a -b -c</echo> - <echo file="${input}/b.txt">aFoo -bFoo -cFoo</echo> - <copy todir="${output}"> - <fileset dir="${input}"/> - <filterchain> - <suffixlines suffix="Foo"/> - </filterchain> - </copy> - <au:assertFilesMatch expected="${input}/b.txt" - actual="${output}/a.txt"/> - </target> -</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/uniq-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/uniq-test.xml deleted file mode 100644 index 832ec944..00000000 --- a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/filters/uniq-test.xml +++ /dev/null @@ -1,81 +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="${output}"/> - </target> - - <target name="testUniqFilter" depends="setUp"> - <copy file="input/uniq.txt" - tofile="${output}/uniq.txt"> - <filterchain> - <uniqfilter/> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/uniq.txt" - actual="${output}/uniq.txt"/> - </target> - - <target name="testUniqTokenFilter" depends="setUp"> - <copy file="input/uniq.txt" - tofile="${output}/uniq.txt"> - <filterchain> - <tokenfilter> - <uniqfilter/> - </tokenfilter> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/uniq.txt" - actual="${output}/uniq.txt"/> - </target> - - <target name="testSortUniq" depends="setUp"> - <copy file="input/uniq.txt" - tofile="${output}/uniq.txt"> - <filterchain> - <sortfilter/> - <tokenfilter> - <uniqfilter/> - </tokenfilter> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/sortuniq.txt" - actual="${output}/uniq.txt"/> - </target> - - <target name="testUniqueColumns" depends="setUp"> - <copy file="input/unique-columns.txt" - tofile="${output}/unique-columns.txt"> - <filterchain> - <tokenfilter> - <stringtokenizer/> - <uniqfilter/> - </tokenfilter> - </filterchain> - </copy> - <au:assertFilesMatch - expected="expected/unique-columns.txt" - actual="${output}/unique-columns.txt"/> - </target> - -</project> |