ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: [PATCH] XMLCatalog testcase fix
Date Tue, 03 Dec 2002 07:12:59 GMT
On Mon, Dec 02, 2002 at 05:33:52PM +0100, Stefan Bodewig wrote:
> On Sun, 1 Dec 2002, Jeff Turner <> wrote:
> > Poking around the XMLCatalog stuff, I've found: - The external
> > catalog support isn't tested when ' test' is run, because
> > resolver.jar isn't in the test classpath.
> XmlValidateTest is run in either case for me - I don't see how and why
> it should be excluded.

Yes it is always run, but the test targets are a bit unusual.  Eg

  <target name="xmlcatalogfiles">
    <xmlvalidate warn="false">
      <fileset dir="xml" includes="**/about.xml"/>
      <xmlcatalog classpath="xml">
        <catalogfiles dir="xml" includes="catalog"/>
        <dtd publicID="-//stevo//DTD doc 1.0//EN"

This passes regardless of whether catalog support is present, because the
<dtd> is used, and <catalogfiles> doesn't get a chance to fail.
Commenting out the <dtd> entry causes the test to fail when it should
pass (with resolver.jar present).

The attached patch should fix this, by separating the
"test external catalogs" and "test internal catalogs" tests.

The two tests can be run with:

./ run-single-test


./ run-single-test

The first should always pass, regardless of resolver.jar's presence.  The
second should initially fail with:

Caused by: chemical

That can be fixed by copying the attached catalog file to
src/etc/testcases/taskdefs/optional/xml/catalog, after which (if
resolver.jar is in the classpath) it should pass.

The patch also modifies build.xml to only run XmlValidateCatalogTest when
resolver.jar is present.


> Passes as is in fresh checkout - with and without resolver.jar in my
> Stefan
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

View raw message