Browse Source

one more test case -JSP xml format (which does work), and ran tabs-to-spaces on the jspc.xml file just to make the diff look bigger.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269894 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 23 years ago
parent
commit
feb1b040e9
2 changed files with 64 additions and 36 deletions
  1. +16
    -0
      src/etc/testcases/taskdefs/optional/jsp/xml.jsp
  2. +48
    -36
      src/etc/testcases/taskdefs/optional/jspc.xml

+ 16
- 0
src/etc/testcases/taskdefs/optional/jsp/xml.jsp View File

@@ -0,0 +1,16 @@
<?xml version="1.0" ?>
<!-- :mode=xml:indentSize=2 -->
<!-- note the lack of a language setting here. crimson whined when ISO-8859-1 was set,
that it thought it was loading a file of type ISO_8859_1 and
so there was a mismatch, even though the mismatch is only
between hyphen types -->
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
version="1.2"
>
<jsp:directive.page language="java" />
<jsp:directive.page contentType="application/xml" />
<timestamp>
<jsp:expression>System.currentTimeMillis()</jsp:expression>
</timestamp>
</jsp:root>

+ 48
- 36
src/etc/testcases/taskdefs/optional/jspc.xml View File

@@ -2,53 +2,65 @@

<project name="jspc-test" default="main" basedir=".">

<target name="main" depends="simple,missing_tld">

<target name="main" depends="simple,missing_tld,uriroot,xml">
</target>

<target name="init">
<property name="jsp.dir" location="jsp"/>
<property name="jsp.output.dir" location="${jsp.dir}/java"/>
<property name="jsp.verbosity" value="3"/>
<mkdir dir="${jsp.output.dir}"/>
</target>
<target name="cleanup">
<delete dir="${jsp.output.dir}"/>
</target>
<target name="init">
<property name="jsp.dir" location="jsp"/>
<property name="jsp.output.dir" location="${jsp.dir}/java"/>
<property name="jsp.verbosity" value="3"/>
<mkdir dir="${jsp.output.dir}"/>
</target>
<target name="cleanup">
<delete dir="${jsp.output.dir}"/>
</target>
<!-- this should fail -->
<!-- it should not create an output file, but it does, which needs
cleanup -->
<target name="missing_tld" depends="init">
<jspc
destdir="${jsp.output.dir}"
srcdir="${jsp.dir}"
verbose="${jsp.verbosity}">
<include
<jspc
destdir="${jsp.output.dir}"
srcdir="${jsp.dir}"
verbose="${jsp.verbosity}">
<include
name="missing_tld.jsp"/>
</jspc>
</jspc>
</target>

<!-- this should compile to simple.java -->
<target name="simple" depends="init">
<jspc
destdir="${jsp.output.dir}"
srcdir="${jsp.dir}"
verbose="${jsp.verbosity}">
<include
<jspc
destdir="${jsp.output.dir}"
srcdir="${jsp.dir}"
verbose="${jsp.verbosity}">
<include
name="simple.jsp"/>
</jspc>
</jspc>
</target>

<!-- this should also compile to simple.java -->
<target name="uriroot" depends="init">
<jspc
destdir="${jsp.output.dir}"
uriroot="${jsp.dir}"
srcdir="${jsp.dir}"
verbose="${jsp.verbosity}">
<include
name="uriroot.jsp"/>
</jspc>
</target>
<!-- this should compile to uriroot.java -->
<target name="uriroot" depends="init">
<jspc
destdir="${jsp.output.dir}"
uriroot="${jsp.dir}"
srcdir="${jsp.dir}"
verbose="${jsp.verbosity}">
<include
name="uriroot.jsp"/>
</jspc>
</target>
<!-- this should compile an xml format jsp page to xml.java -->
<target name="xml" depends="init">
<jspc
destdir="${jsp.output.dir}"
uriroot="${jsp.dir}"
srcdir="${jsp.dir}"
verbose="${jsp.verbosity}">
<include name="xml.jsp"/>
</jspc>
</target>
</project>

Loading…
Cancel
Save