diff options
author | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
commit | 144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch) | |
tree | b12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/ant | |
parent | fafae443719b26159ab2d7dac1c9b46b5e00b671 (diff) | |
download | aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip |
initial version
Diffstat (limited to 'tests/ant')
-rw-r--r-- | tests/ant/etc/ajc.xml | 406 | ||||
-rw-r--r-- | tests/ant/etc/ajc2.xml | 201 | ||||
-rw-r--r-- | tests/ant/etc/ajclean.xml | 318 | ||||
-rw-r--r-- | tests/ant/etc/ajdoc.xml | 545 | ||||
-rw-r--r-- | tests/ant/filecompare/fileCompareTestDirs.zip | bin | 0 -> 464342 bytes | |||
-rw-r--r-- | tests/ant/filecompare/makeTestDir.sh | 49 | ||||
-rw-r--r-- | tests/ant/src/One.java | 3 | ||||
-rw-r--r-- | tests/ant/src/Three.java | 3 | ||||
-rw-r--r-- | tests/ant/src/Two.java | 3 | ||||
-rw-r--r-- | tests/ant/src/myhelp.html | 0 | ||||
-rw-r--r-- | tests/ant/src/mystylesheet.css | 0 |
11 files changed, 1528 insertions, 0 deletions
diff --git a/tests/ant/etc/ajc.xml b/tests/ant/etc/ajc.xml new file mode 100644 index 000000000..c261837c8 --- /dev/null +++ b/tests/ant/etc/ajc.xml @@ -0,0 +1,406 @@ +<project name="ajc.test" basedir="." default="init"> + + <!-- caller should define compile.classpath and ajc.taskdef.classpath --> + <property file="${basedir}/local.properties"/> + <property name="ant.test.src.dir" value="../src" /> + + <target name="init"> + <tstamp/> + <taskdef name="ajc" classname="org.aspectj.tools.ant.taskdefs.Ajc" + classpath="${ajc.taskdef.classpath}"/> + </target> + + <target name="all" depends="init"> + <antcall target="test1"/> + <antcall target="test2"/> + <antcall target="test3"/> + <antcall target="test4"/> + <antcall target="test4b"/> + <antcall target="test5"/> + <antcall target="test5b"/> + <antcall target="test6"/> + <antcall target="test8"/> + <antcall target="test9"/> + <antcall target="test10"/> + <antcall target="test11"/> + <antcall target="test12"/> + <antcall target="test13"/> + <antcall target="test14"/> +<!-- todo failures are killing the run at this time + <antcall target="fail1" /> + <antcall target="fail2" /> + <antcall target="fail3" /> +--> + </target> + + <target name="test1" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + classpath="${compile.classpath}" + /> + + </target> + + <target name="test2" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java,Two.java" + classpath="${compile.classpath}" + /> + </target> + + <target name="test3" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="*" + classpath="${compile.classpath}" + /> + </target> + + <target name="test4" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files1.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test4b" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files1.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test5" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files2.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test5b" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files2.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test6" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files3.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test6b" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files3.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test8" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + excludes="Two.java" + argfiles="${ant.test.src.dir}/files2.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test9" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + threads="1" + classpath="${compile.classpath}" + /> + </target> + + <target name="test10" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + nocomments="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test11" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + nosymbols="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test12" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + preprocess="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test13" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + workingdir="ajworkingdir" + classpath="${compile.classpath}" + /> + </target> + <target name="test14" depends="init" + description="TestCase for PR#557 (NPE when logging if no optional destdir)"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + includes="One.java" + classpath="${compile.classpath}" + /> + </target> + + + <target name="fail1" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + includes="One.java" + classpath="${compile.classpath}" + failonerror="no" + /> + </target> + + <target name="fail2" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + excludes="One.java" + classpath="${compile.classpath}" + failonerror="no" + /> + </target> + + <target name="fail3" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + includes="Two.java" + excludes="One.java" + classpath="${compile.classpath}" + /> + </target> + + <!-- forked --> + + <target name="test1_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test2_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java,Two.java" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test3_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="*" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test4_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files1.lst" + classpath="${compile.classpath}" + fork="yes" + /> + </target> + + <target name="test4b_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files1.lst" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test5_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files2.lst" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test5b_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files2.lst" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test6_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files3.lst" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test6b_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files3.lst" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test8_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + excludes="Two.java" + argfiles="${ant.test.src.dir}/files2.lst" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test9_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + threads="1" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test10_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + nocomments="yes" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test11_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + nosymbols="yes" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test12_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + preprocess="yes" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test13_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + workingdir="ajworkingdir" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="fail1_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + includes="One.java" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="fail2_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + excludes="One.java" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="fail3_fork" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + includes="Two.java" + excludes="One.java" + fork="yes" + classpath="${compile.classpath}" + /> + </target> + +</project> diff --git a/tests/ant/etc/ajc2.xml b/tests/ant/etc/ajc2.xml new file mode 100644 index 000000000..283dd509b --- /dev/null +++ b/tests/ant/etc/ajc2.xml @@ -0,0 +1,201 @@ +<project name="ajc2.test" basedir="." default="init"> + + <property name="ant.test.src.dir" value="../src" /> + <property name="ant.test.classes" value="test-classes"/> + + <target name="init"> + <tstamp/> + <taskdef name="ajc" classname="org.aspectj.tools.ant.taskdefs.Ajc2" + classpath="${ajc.taskdef.classpath}" /> + </target> + + <target name="all" depends="init"> + <antcall target="test1"/> + <antcall target="test2"/> + <antcall target="test3"/> + <antcall target="test4"/> + <antcall target="test4b"/> + <antcall target="test5"/> + <antcall target="test5b"/> + <antcall target="test6"/> + <antcall target="test8"/> + <antcall target="test9"/> + <antcall target="test10"/> + <antcall target="test11"/> + <antcall target="test12"/> + <antcall target="test13"/> + <antcall target="fail1"/> + <antcall target="fail2"/> + <antcall target="fail3"/> + </target> + + <target name="test1" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + classpath="${compile.classpath}" + /> + </target> + + <target name="test2" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java,Two.java" + classpath="${compile.classpath}" + /> + </target> + + <target name="test3" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="*" + classpath="${compile.classpath}" + /> + </target> + + <target name="test4" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files1.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test4b" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files1.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test5" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files2.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test5b" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files2.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test6" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files3.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test6b" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.src.dir}/files3.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test8" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + excludes="Two.java" + argfiles="${ant.test.src.dir}/files2.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test9" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + threads="1" + classpath="${compile.classpath}" + /> + </target> + + <target name="test10" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + nocomments="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test11" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + nosymbols="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test12" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + preprocess="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test13" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc srcdir="${ant.test.src.dir}" + destdir="${ant.test.classes}" + includes="One.java" + workingdir="ajworkingdir" + classpath="${compile.classpath}" + /> + </target> + + <target name="fail1" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + includes="One.java" + classpath="${compile.classpath}" + /> + </target> + + <target name="fail2" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + excludes="One.java" + classpath="${compile.classpath}" + /> + </target> + + <target name="fail3" depends="init"> + <mkdir dir="${ant.test.classes}"/> + <ajc + destdir="${ant.test.classes}" + includes="Two.java" + excludes="One.java" + classpath="${compile.classpath}" + /> + </target> + +</project> diff --git a/tests/ant/etc/ajclean.xml b/tests/ant/etc/ajclean.xml new file mode 100644 index 000000000..e3c893c26 --- /dev/null +++ b/tests/ant/etc/ajclean.xml @@ -0,0 +1,318 @@ +<project name="ajc.test" basedir="." default="init"> + + <property name="ant.test.sources" value="../src" /> + <property name="ant.test.classes" value="test-classes"/> + + <target name="init"> + <tstamp/> + <taskdef name="ajc" classname="org.aspectj.tools.ant.taskdefs.Ajc"/> + <taskdef name="ajclean" classname="org.aspectj.tools.ant.taskdefs.Ajclean"/> + </target> + + <target name="test1" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + /> + </target> + + <target name="test2" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java,Two.java" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java,Two.java" + /> + </target> + + <target name="test3" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="*" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="*" + /> + </target> + + <target name="test4" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files1.lst" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files1.lst" + /> + </target> + + <target name="test4b" depends="init"> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files1.lst" + /> + <ajclean + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files1.lst" + /> + </target> + + <target name="test5" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files2.lst" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files2.lst" + /> + </target> + + <target name="test5b" depends="init"> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files2.lst" + /> + <ajclean + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files2.lst" + /> + </target> + + <target name="test6" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files3.lst" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files3.lst" + /> + </target> + + <target name="test6b" depends="init"> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files3.lst" + /> + <ajclean + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files3.lst" + /> + </target> + + <target name="test8" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + excludes="Two.java" + argfiles="${ant.test.sources}/files2.lst" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + excludes="Two.java" + argfiles="${ant.test.sources}/files2.lst" + /> + </target> + + <target name="test9" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + threads="1" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + threads="1" + /> + </target> + + <target name="test10" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + nocomments="yes" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + nocomments="yes" + /> + </target> + + <target name="test11" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + nosymbols="yes" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + nosymbols="yes" + /> + </target> + + <target name="test12" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + preprocess="yes" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + preprocess="yes" + /> + </target> + + <target name="test13" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + workingdir="ajworkingdir" + /> + <ajclean srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + workingdir="ajworkingdir" + /> + </target> + + + <!-- Everything --> + + <target name="test1star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test2star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java,Two.java" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test3star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="*" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test4star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files1.lst" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test4bstar" depends="init"> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files1.lst" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test5star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files2.lst" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test5bstar" depends="init"> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files2.lst" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test6star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files3.lst" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test6bstar" depends="init"> + <ajc + destdir="${ant.test.classes}" + argfiles="${ant.test.sources}/files3.lst" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test8star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + excludes="Two.java" + argfiles="${ant.test.sources}/files2.lst" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test9star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + threads="1" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test10star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + nocomments="yes" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test11star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + nosymbols="yes" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test12star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + preprocess="yes" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + + <target name="test13star" depends="init"> + <ajc srcdir="${ant.test.sources}" + destdir="${ant.test.classes}" + includes="One.java" + workingdir="ajworkingdir" + /> + <ajclean srcdir="${ant.test.sources}"/> + </target> + +</project> diff --git a/tests/ant/etc/ajdoc.xml b/tests/ant/etc/ajdoc.xml new file mode 100644 index 000000000..58803bb8a --- /dev/null +++ b/tests/ant/etc/ajdoc.xml @@ -0,0 +1,545 @@ +<project name="ajdoc.test" basedir="." default="test"> + + <!-- this file defines ant.test.src.dir, ant.test.doc.dir todo remove local defs--> + <property file="${basedir}/local.properties"/> + + <target name="init"> + <tstamp/> + <taskdef name="ajdoc" classname="org.aspectj.tools.ant.taskdefs.Ajdoc" + classpath="${ajc.taskdef.classpath}" /> + </target> + +<!-- fail998 ,fail999 --> + <target name="test" + depends="test985 + ,test986 + ,test987 + ,test988 + ,test989 + ,test990 + ,test991 + ,test992 + ,test993 + ,test994 + ,test995 + ,test996 + ,test997 + ,test998 + ,test999 + ,test_author_no + ,test_author_yes + ,test_bottom + ,test_doctitle + ,test_footer + ,test_header + ,test_helpfile + ,test_nodeprecated_no + ,test_nodeprecated_yes + ,test_nodeprecatedlist_no + ,test_nodeprecatedlist_yes + ,test_nohelp_no + ,test_nohelp_yes + ,test_noindex_no + ,test_noindex_yes + ,test_notree_no + ,test_notree_yes + ,test_package_no + ,test_package_yes + ,test_private_no + ,test_private_yes + ,test_protected_no + ,test_protected_yes + ,test_public_no + ,test_public_yes + ,test_splitindex_no + ,test_splitindex_yes + ,test_stylesheetfile + ,test_use_no + ,test_use_yes + ,test_standard_no + ,test_standard_yes + ,test_windowtitle"/> + + <target name="fail998" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + sourcefiles="One.java" + classpath="${compile.classpath}" + /> + </target> + + <target name="fail999" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_stylesheetfile" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + stylesheetfile="${ant.test.src.dir}/mystylesheet.css" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_helpfile" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + helpfile="${ant.test.src.dir}/myhelp.html" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_nodeprecatedlist_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + nodeprecatedlist="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_nodeprecatedlist_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + nodeprecatedlist="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_nodeprecated_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + nodeprecated="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_nodeprecated_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + nodeprecated="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_use_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + use="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_use_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + use="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_standard_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + standard="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_standard_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + standard="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_author_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + author="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_author_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + author="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_public_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + public="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_public_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + public="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_package_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + package="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_package_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + package="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_protected_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + protected="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_protected_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + protected="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_private_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + private="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_private_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + private="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_splitindex_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + splitindex="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_splitindex_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + splitindex="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_windowtitle" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + windowtitle="Window Title" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_doctitle" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + doctitle="<H1>Doc Title</H1>" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_bottom" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + bottom="<H1>Bottom</H1>" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_footer" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + footer="<H1>Footer</H1>" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_header" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + header="<H1>Header</H1>" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_nohelp_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + nohelp="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_nohelp_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + nohelp="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_noindex_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + noindex="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_noindex_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + noindex="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_notree_no" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + notree="no" + classpath="${compile.classpath}" + /> + </target> + + <target name="test_notree_yes" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + notree="yes" + classpath="${compile.classpath}" + /> + </target> + + <target name="test985" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagelist="${ant.test.src.dir}/pkgs4.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test986" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagelist="${ant.test.src.dir}/pkgs3.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test987" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagelist="${ant.test.src.dir}/pkgs2.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test988" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagelist="${ant.test.src.dir}/pkgs1.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test989" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagenames="p1.*,p2.*" + classpath="${compile.classpath}" + /> + </target> + + <target name="test990" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagenames="p1,p1.pp1,p2,p2.pp2" + classpath="${compile.classpath}" + /> + </target> + + <target name="test991" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagenames="p1,p1.pp1,p2" + classpath="${compile.classpath}" + /> + </target> + + <target name="test992" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagenames="p1,p2" + classpath="${compile.classpath}" + /> + </target> + + <target name="test993" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagenames="p1,p1.pp1" + classpath="${compile.classpath}" + /> + </target> + + <target name="test994" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagenames="p1.*" + classpath="${compile.classpath}" + /> + </target> + + <target name="test995" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + packagenames="p1" + classpath="${compile.classpath}" + /> + </target> + + <target name="test996" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + argfiles="${ant.test.src.dir}/files2.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test997" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + argfiles="${ant.test.src.dir}/files1.lst" + classpath="${compile.classpath}" + /> + </target> + + <target name="test998" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java,Two.java" + classpath="${compile.classpath}" + /> + </target> + + <target name="test999" depends="init"> + <mkdir dir="${ant.test.doc.dir}"/> + <ajdoc sourcepath="${ant.test.src.dir}" + destdir="${ant.test.doc.dir}" + sourcefiles="One.java" + classpath="${compile.classpath}" + /> + </target> + +</project> diff --git a/tests/ant/filecompare/fileCompareTestDirs.zip b/tests/ant/filecompare/fileCompareTestDirs.zip Binary files differnew file mode 100644 index 000000000..f882d6005 --- /dev/null +++ b/tests/ant/filecompare/fileCompareTestDirs.zip diff --git a/tests/ant/filecompare/makeTestDir.sh b/tests/ant/filecompare/makeTestDir.sh new file mode 100644 index 000000000..815a14907 --- /dev/null +++ b/tests/ant/filecompare/makeTestDir.sh @@ -0,0 +1,49 @@ +#!/bin/sh
+# awkward script to generate test case for filecompare of 2 different dirs
+
+catExpected() {
+ cat<<EOF
+1a2
+> \a1\a1
+12d12
+< \b1\b1
+23,24d22
+< \c1\added
+< \c1\c1
+424,425d421
+< dir.zip!dir/a1/
+< dir.zip!dir/a1/a1
+468a465
+> dir.zip!dir/c1/added
+EOF
+}
+
+abc="a b c d e f g h i j k l m n o p q r s"
+n123="0 1 2 3 4 5 6 7 8 9"
+mkdir dir
+cd dir
+for a in ${abc}; do
+ mkdir "$a"
+ for n in ${n123} ; do
+ echo "$abc $n "
+ mkdir "${a}${n}"
+ echo "$a$n " > "${a}${n}/${a}${n}"
+ done > "$a/$a"
+done
+cd ..
+cp -r dir subdir
+mv subdir dir/
+cp -r dir dir2
+zip -rq one.zip dir/*
+# create some differences
+rm -rf dir/a1
+rm dir2/b1/b1
+rm dir2/c1/c1
+echo added > dir/c1/added
+zip -rq two.zip dir/*
+mv one.zip dir/c2/dir.zip
+mv two.zip dir2/c2/dir.zip
+
+# save expected and wrap up for checkin
+catExpected > expected
+zip -qr fileCompareTestDirs.zip expected dir/* dir2/*
diff --git a/tests/ant/src/One.java b/tests/ant/src/One.java new file mode 100644 index 000000000..56aa7c620 --- /dev/null +++ b/tests/ant/src/One.java @@ -0,0 +1,3 @@ +public class One { + int i1; +} diff --git a/tests/ant/src/Three.java b/tests/ant/src/Three.java new file mode 100644 index 000000000..ec6ef629d --- /dev/null +++ b/tests/ant/src/Three.java @@ -0,0 +1,3 @@ +public class Three { + int i3; +} diff --git a/tests/ant/src/Two.java b/tests/ant/src/Two.java new file mode 100644 index 000000000..d1d2a4e0f --- /dev/null +++ b/tests/ant/src/Two.java @@ -0,0 +1,3 @@ +public class Two { + int i2; +} diff --git a/tests/ant/src/myhelp.html b/tests/ant/src/myhelp.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/ant/src/myhelp.html diff --git a/tests/ant/src/mystylesheet.css b/tests/ant/src/mystylesheet.css new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/ant/src/mystylesheet.css |