90 lines
3.4 KiB
XML
90 lines
3.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
|
|
Copyright (c) 2004-2013, Willem Cazander
|
|
All rights reserved.
|
|
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
|
that the following conditions are met:
|
|
|
|
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
|
following disclaimer.
|
|
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
|
the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
|
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
-->
|
|
<project name="ant-schema-task" basedir="../../../..">
|
|
|
|
<property name="test.dir" value="${basedir}/target/test-schemas/"/>
|
|
|
|
<target name="init">
|
|
<taskdef name="x4oTask" classname="org.x4o.plugin.ant.X4OTask"/>
|
|
<mkdir dir="${test.dir}"/>
|
|
<mkdir dir="${test.dir}/test"/>
|
|
</target>
|
|
|
|
<target name="test-cel-schema-full" depends="init">
|
|
<mkdir dir="${test.dir}/cel-full"/>
|
|
<x4oTask languageName="cel" taskId="eld-xsd">
|
|
<x4oTaskProperty
|
|
key="http://language.x4o.org/xml/properties/eld-xsd/output/path"
|
|
value="${test.dir}/cel-full"
|
|
/>
|
|
</x4oTask>
|
|
</target>
|
|
|
|
<target name="test-cel-schema-single" depends="init">
|
|
<mkdir dir="${test.dir}/cel-single"/>
|
|
<x4oTask languageName="cel" taskId="eld-xsd">
|
|
<x4oTaskProperty
|
|
key="http://language.x4o.org/xml/properties/eld-xsd/output/path"
|
|
value="${test.dir}/cel-single"
|
|
/>
|
|
<x4oTaskProperty
|
|
key="http://language.x4o.org/xml/properties/eld-xsd/filter/namespace"
|
|
value="http://cel.x4o.org/xml/ns/cel-core"
|
|
/>
|
|
</x4oTask>
|
|
</target>
|
|
|
|
<target name="test-cel-schema-verbose" depends="init">
|
|
<mkdir dir="${test.dir}/cel-single-verbose"/>
|
|
<x4oTask languageName="cel" taskId="eld-xsd" verbose="true">
|
|
<x4oTaskProperty
|
|
key="http://language.x4o.org/xml/properties/eld-xsd/output/path"
|
|
value="${test.dir}/cel-single-verbose"
|
|
/>
|
|
<x4oTaskProperty
|
|
key="http://language.x4o.org/xml/properties/eld-xsd/filter/namespace"
|
|
value="http://cel.x4o.org/xml/ns/cel-core"
|
|
/>
|
|
</x4oTask>
|
|
</target>
|
|
|
|
<target name="test-fail-all" depends="init">
|
|
<x4oTask/>
|
|
</target>
|
|
<target name="test-fail-destdir" depends="init">
|
|
<x4oTask languageName="cel"/>
|
|
</target>
|
|
<target name="test-fail-destdir-error" depends="init">
|
|
<x4oTask languageName="cel" destdir="${test.dir}/no-dir"/>
|
|
</target>
|
|
<target name="test-fail-language" depends="init">
|
|
<x4oTask destdir="${test.dir}/test"/>
|
|
</target>
|
|
<target name="test-fail-language-error" depends="init">
|
|
<x4oTask destdir="${test.dir}/test" languageName="eld-error"/>
|
|
</target>
|
|
|
|
</project> |