| <?xml version="1.0"?> |
| |
| <!-- Testcases for Velocity --> |
| <project name="main" default="test-all"> |
| |
| <property name="build.dir" value="../bin"/> |
| <property name="build.dest" value="${build.dir}/classes"/> |
| <property name="ant.home" value="."/> |
| <property name="test.home" value="../test"/> |
| <property name="junit.jar" value="lib/junit-3.2.jar"/> |
| |
| <!-- JUnit Testbed properties --> |
| <property name="velocity.test.runner" value="junit.textui.TestRunner"/> |
| |
| <!-- Build classpath --> |
| <path id="classpath"> |
| <fileset dir="./lib"> |
| <include name="**/*.jar"/> |
| </fileset> |
| <pathelement location="${build.dest}"/> |
| </path> |
| |
| <!-- =================================================================== --> |
| <!-- JUnit Test Cases --> |
| <!-- =================================================================== --> |
| <target name="test-all" depends=" |
| test-template, |
| test-velocityapp, |
| test-introspect, |
| test-inlinevmscope, |
| test-multi, |
| test-cpload, |
| test-contextsafety, |
| test-anakia, |
| test-configuration |
| "/> |
| |
| <target name="test-template"> |
| <echo message="Running Template tests..."/> |
| |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.TemplateTestCase"/> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-velocityapp"> |
| <echo message="Running app.Velocity tests..."/> |
| |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.VelocityAppTestCase"/> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-introspect"> |
| <echo message="Running Introspector tests..."/> |
| |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.IntrospectorTestCase"/> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-inlinevmscope"> |
| <echo message="Running Inline VM Scope tests..."/> |
| |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.InlineScopeVMTestCase"/> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-multi"> |
| <echo message="Running Multiple File Resource Path tests..."/> |
| |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.MultipleFileResourcePathTest"/> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-cpload"> |
| <echo message="Running Classpath Resource tests..."/> |
| |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.ClasspathResourceTest"/> |
| <classpath> |
| <path refid="classpath"/> |
| <pathelement location="../test/cpload/test1.jar"/> |
| <pathelement location="../test/cpload/test2.jar"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-contextsafety"> |
| <echo message="Running Context Safety tests..."/> |
| |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.ContextSafetyTestCase"/> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-anakia"> |
| <echo message="Running Anakia tests..."/> |
| |
| <taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask"> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </taskdef> |
| <anakia basedir="../test/anakia/xdocs" destdir="../test/anakia/results" |
| extension=".html" style="./site.vsl" |
| projectFile="./stylesheets/project.xml" |
| excludes="**/stylesheets/**" |
| includes="**/*.xml" |
| templatePath="../test/anakia/xdocs/stylesheets" |
| lastModifiedCheck="false"> |
| </anakia> |
| |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.AnakiaTestCase"/> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-configuration"> |
| <java classname="${velocity.test.runner}" fork="yes"> |
| <arg value="org.apache.velocity.test.ConfigurationTestCase"/> |
| <classpath> |
| <path refid="classpath"/> |
| </classpath> |
| </java> |
| </target> |
| |
| <target name="test-clean"> |
| <mkdir dir="${test.home}/templates/results"/> |
| <delete quiet="true" includeEmptyDirs="true" |
| dir="${test.home}/templates/results"/> |
| <delete dir="${test.home}/anakia/results" quiet="true"/> |
| </target> |
| |
| </project> |
| |