2012-09-11 13:15:26 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2004-2012, 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">
|
2013-04-08 21:44:16 +02:00
|
|
|
<taskdef name="writeLanguageSchema" classname="org.x4o.plugin.ant.X4OWriteLanguageSchemaTask"/>
|
2012-09-11 13:15:26 +02:00
|
|
|
<mkdir dir="${test.dir}"/>
|
|
|
|
|
<mkdir dir="${test.dir}/test"/>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="test-cel-schema-full" depends="init">
|
|
|
|
|
<mkdir dir="${test.dir}/cel-full"/>
|
2013-04-08 21:44:16 +02:00
|
|
|
<writeLanguageSchema
|
2012-09-11 13:15:26 +02:00
|
|
|
destdir="${test.dir}/cel-full"
|
2013-04-11 09:26:38 +02:00
|
|
|
languageName="eld"
|
2012-09-11 13:15:26 +02:00
|
|
|
/>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="test-cel-schema-single" depends="init">
|
|
|
|
|
<mkdir dir="${test.dir}/cel-single"/>
|
2013-04-08 21:44:16 +02:00
|
|
|
<writeLanguageSchema
|
2012-09-11 13:15:26 +02:00
|
|
|
destdir="${test.dir}/cel-single"
|
2013-04-11 09:26:38 +02:00
|
|
|
languageName="cel"
|
2012-09-11 13:15:26 +02:00
|
|
|
nsuri="http://cel.x4o.org/xml/ns/cel-core"
|
|
|
|
|
/>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="test-cel-schema-verbose" depends="init">
|
|
|
|
|
<mkdir dir="${test.dir}/cel-single"/>
|
2013-04-08 21:44:16 +02:00
|
|
|
<writeLanguageSchema
|
2012-09-11 13:15:26 +02:00
|
|
|
verbose="true"
|
|
|
|
|
destdir="${test.dir}/cel-single"
|
2013-04-11 09:26:38 +02:00
|
|
|
languageName="cel"
|
2012-09-11 13:15:26 +02:00
|
|
|
nsuri="http://cel.x4o.org/xml/ns/cel-core"
|
|
|
|
|
/>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="test-fail-all" depends="init">
|
2013-04-08 21:44:16 +02:00
|
|
|
<writeLanguageSchema/>
|
2012-09-11 13:15:26 +02:00
|
|
|
</target>
|
|
|
|
|
<target name="test-fail-destdir" depends="init">
|
2013-04-11 09:26:38 +02:00
|
|
|
<writeLanguageSchema languageName="cel"/>
|
2012-09-11 13:15:26 +02:00
|
|
|
</target>
|
|
|
|
|
<target name="test-fail-destdir-error" depends="init">
|
2013-04-11 09:26:38 +02:00
|
|
|
<writeLanguageSchema languageName="cel" destdir="${test.dir}/no-dir"/>
|
2012-09-11 13:15:26 +02:00
|
|
|
</target>
|
2013-04-06 23:07:06 +02:00
|
|
|
<target name="test-fail-language" depends="init">
|
2013-04-08 21:44:16 +02:00
|
|
|
<writeLanguageSchema destdir="${test.dir}/test"/>
|
2012-09-11 13:15:26 +02:00
|
|
|
</target>
|
2013-04-06 23:07:06 +02:00
|
|
|
<target name="test-fail-language-error" depends="init">
|
2013-04-11 09:26:38 +02:00
|
|
|
<writeLanguageSchema destdir="${test.dir}/test" languageName="eld-error"/>
|
2012-09-11 13:15:26 +02:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
</project>
|