]> granicus.if.org Git - docbook-dsssl/commitdiff
Added tests/unit-tests; added calloutlist.003.xml to the skip list (it intentionally...
authorNorman Walsh <ndw@nwalsh.com>
Tue, 13 Mar 2007 12:35:58 +0000 (12:35 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 13 Mar 2007 12:35:58 +0000 (12:35 +0000)
docbook/relaxng/docbook/tests/skip/calloutlist.003.xml [new file with mode: 0644]
docbook/relaxng/docbook/tests/unit-tests/rfe1589139.xml [new file with mode: 0644]
docbook/relaxng/docbook/tests/unit-tests/rfe1627845.xml [new file with mode: 0644]
docbook/relaxng/docbook/tests/unit-tests/rfe1630203.xml [new file with mode: 0644]
docbook/relaxng/tools/runtests

diff --git a/docbook/relaxng/docbook/tests/skip/calloutlist.003.xml b/docbook/relaxng/docbook/tests/skip/calloutlist.003.xml
new file mode 100644 (file)
index 0000000..6dff4b3
--- /dev/null
@@ -0,0 +1,162 @@
+<article xmlns="http://docbook.org/ns/docbook" version="5.0">
+  <info><title>Unit Test: calloutlist.003</title>
+    
+    <releaseinfo role="CVS">$Id: calloutlist.003.xml 5258 2005-10-12 14:35:03Z xmldoc $</releaseinfo>
+    <author><personname><firstname>Benoit</firstname><surname>Guillon</surname></personname></author>
+  </info>
+
+<section><info><title>Callouts</title></info>
+
+<section><info><title>Embedded <tag>Co</tag>s</title></info>
+
+<programlisting>
+  &lt;refentry&gt;
+    &lt;info&gt;
+      &lt;date&gt;2003-10-20&lt;/date&gt; <co xml:id="V1690_date-co" linkends="V1690_date"/>
+    &lt;/info&gt;
+    &lt;refmeta&gt;
+      &lt;refentrytitle&gt;gtk-options&lt;/refentrytitle&gt; <co xml:id="V1690_title-co" linkends="V1690_title"/>
+      &lt;manvolnum&gt;7&lt;/manvolnum&gt; <co xml:id="V1690_manvolnum-co" linkends="V1690_manvolnum"/>
+      &lt;refmiscinfo class="source-name"&gt;GTK+&lt;/refmiscinfo&gt; <co xml:id="V1690_source-name-co" linkends="V1690_source-name"/>
+      &lt;refmiscinfo class="version"&gt;1.2&lt;/refmiscinfo&gt; <co xml:id="V1690_version-co" linkends="V1690_version"/>
+      &lt;refmiscinfo class="manual"&gt;GTK+ User's Manual&lt;/refmiscinfo&gt; <co xml:id="V1690_manual-co" linkends="V1690_manual"/>
+    &lt;/refmeta&gt;
+    &lt;refnamediv&gt;
+      &lt;refname&gt;gtk-options&lt;/refname&gt;
+      &lt;refpurpose&gt;Standard Command Line Options for GTK+ Programs&lt;/refpurpose&gt;
+    &lt;/refnamediv&gt;
+    &lt;refsect1&gt;
+      &lt;title&gt;Description&lt;/title&gt;
+      &lt;para&gt;This manual page describes the command line options, which
+      are common to all GTK+ based applications.&lt;/para&gt;
+    &lt;/refsect1&gt;
+  &lt;/refentry&gt;
+</programlisting>
+
+<calloutlist>
+  <callout arearefs="V1690_date-co" xml:id="V1690_date">
+    <para>Sets the <quote>date</quote> part of the header/footer.</para>
+  </callout>
+  <callout arearefs="V1690_title-co" xml:id="V1690_title">
+    <para>Sets the <quote>title</quote> part.</para>
+  </callout>
+  <callout arearefs="V1690_manvolnum-co" xml:id="V1690_manvolnum">
+    <para>Sets the <quote>section</quote> part.</para>
+  </callout>
+  <callout arearefs="V1690_source-name-co" xml:id="V1690_source-name">
+    <para>Sets the <quote>source name</quote> part.</para>
+  </callout>
+  <callout arearefs="V1690_version-co" xml:id="V1690_version">
+    <para>Sets the <quote>version</quote> part.</para>
+  </callout>
+  <callout arearefs="V1690_manual-co" xml:id="V1690_manual">
+    <para>Sets the <quote>manual</quote> part.</para>
+  </callout>
+</calloutlist>
+
+<para>
+Another <tag>screen</tag> including <tag>coref</tag> too. The
+first <tag>coref</tag> is not valid, the second one is valid. It checks
+also that several items in co/@linkends are correctly handled.
+</para>
+
+<screen> Volume in drive C is SYSTEM         Serial number is 2350:717C
+ Directory of  C:\
+
+10/17/97   9:04         &lt;DIR&gt;    bin
+10/16/97  14:11         &lt;DIR&gt;    DOS <co xml:id="dos" linkends=" firstco lastco  "/>
+10/16/97  14:40         &lt;DIR&gt;    Program Files
+10/16/97  14:46         &lt;DIR&gt;    TEMP <coref linkend="unknown"/>
+10/17/97   9:04         &lt;DIR&gt;    tmp <coref linkend="dos"/>
+10/16/97  14:37         &lt;DIR&gt;    WINNT
+10/16/97  14:25             119  AUTOEXEC.BAT <co linkends="startup" xml:id="autoexec.bat"/>
+ 2/13/94   6:21          54,619  COMMAND.COM <co linkends="startup" xml:id="command.com"/>
+10/16/97  14:25             115  CONFIG.SYS <co xml:id="config.sys"/>
+11/16/97  17:17      61,865,984  pagefile.sys
+ 2/13/94   6:21           9,349  WINA20.386 <co xml:id="wina20.386"/></screen>
+
+<calloutlist>
+<callout arearefs="dos" xml:id="firstco">
+  <para>
+  This directory holds <trademark>MS-DOS</trademark>, the
+  operating system that was installed before <trademark>Windows
+  NT</trademark>.
+  </para>
+</callout>
+<callout xml:id="startup" arearefs="  autoexec.bat command.com config.sys ">
+  <para>
+  System startup code for DOS.
+  </para>
+</callout>
+<callout arearefs="wina20.386" xml:id="lastco">
+  <para>
+  Some sort of <trademark>Windows 3.1</trademark> hack for some 386 processors,
+  as I recall.
+  </para>
+</callout>
+</calloutlist>
+
+</section>
+
+<section><info><title>Programlistingco</title></info>
+
+<para>This case checks that spaces are added to reach the expected
+column.</para>
+
+<programlistingco>
+<areaspec>
+<area xml:id="hermite1" coords="2 55"/>
+<area xml:id="hermite2" coords="4 55"/>
+</areaspec>
+<programlisting>
+This is a line
+This is another line
+This is a third lien
+
+
+...
+</programlisting>
+<calloutlist>
+<callout arearefs="hermite1 hermite2">
+<para>
+here <function>HermiteNormalFormIntegerMat</function>
+is used
+</para>
+</callout>
+</calloutlist>
+</programlistingco>
+
+<para>This programlistingco checks that you can put several markups at different
+column positions into the same line, and that several markups with no column
+specification are both put at the end of the line. The special case of a markup at
+the end of the last line is checked too.</para>
+<programlistingco>
+<areaspec>
+<area xml:id="pos10" coords="2 10"/>
+<area xml:id="pos12" coords="2 12"/>
+<area xml:id="posend1" coords="2"/>
+<area xml:id="posend2" coords="2"/>
+<area xml:id="poslast" coords="8"/>
+</areaspec>
+<programlisting>
+This is a line
+This is another line
+This is a third lien
+
+
+...
+The very last line</programlisting>
+<calloutlist>
+<callout arearefs="pos10 pos12">
+<para>
+here <function>HermiteNormalFormIntegerMat</function>
+is used
+</para>
+</callout>
+</calloutlist>
+</programlistingco>
+</section>
+</section>
+</article>
diff --git a/docbook/relaxng/docbook/tests/unit-tests/rfe1589139.xml b/docbook/relaxng/docbook/tests/unit-tests/rfe1589139.xml
new file mode 100644 (file)
index 0000000..9da8bae
--- /dev/null
@@ -0,0 +1,25 @@
+<book xmlns="http://docbook.org/ns/docbook"
+      xmlns:xlink="http://www.w3.org/1999/xlink">
+<title>Sample book title</title>
+
+<chapter>
+<title>Sample chapter title</title>
+
+<para>This unit test contains a <tag>qandaentry</tag> with a <tag>title</tag>, per
+<link xlink:href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1589139&amp;group_id=21935&amp;atid=384107"/>.</para>
+
+<qandaset>
+<qandaentry>
+<title>QandA Entry Title</title>
+<question>
+<para>What is the question.</para>
+</question>
+<answer>
+<para>I don't know, but the answer is 42.</para>
+</answer>
+</qandaentry>
+</qandaset>
+
+</chapter>
+
+</book>
diff --git a/docbook/relaxng/docbook/tests/unit-tests/rfe1627845.xml b/docbook/relaxng/docbook/tests/unit-tests/rfe1627845.xml
new file mode 100644 (file)
index 0000000..0786535
--- /dev/null
@@ -0,0 +1,55 @@
+<book xmlns="http://docbook.org/ns/docbook"
+      xmlns:xlink="http://www.w3.org/1999/xlink">
+<title>Sample book title</title>
+
+<chapter>
+<title>Sample chapter title</title>
+
+<para>This unit test contains a CALS <tag>table</tag> and a CALS
+<tag>informaltable</tag>, each with a <tag>caption</tag>, per
+<link xlink:href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1627845&amp;group_id=21935&amp;atid=384107"/>. It also contains an HTML
+<tag>table</tag> with a <tag>caption</tag> that contains inlines, a decision
+reached while resolving the caption RFE.</para>
+
+<table>
+<title>Some table</title>
+<tgroup cols="2">
+<tbody>
+<row>
+<entry>T1.A1</entry>
+<entry>T1.A2</entry>
+</row>
+</tbody>
+</tgroup>
+<caption>
+<para>This is a table caption.</para>
+</caption>
+</table>
+
+<informaltable>
+<tgroup cols="2">
+<tbody>
+<row>
+<entry>T2.A1</entry>
+<entry>T2.A2</entry>
+</row>
+</tbody>
+</tgroup>
+<caption>
+<para>This is an informal table caption.</para>
+</caption>
+</informaltable>
+
+<table>
+<caption>This is an <emphasis>HTML</emphasis> table</caption>
+<tbody>
+<tr>
+<td>T3.A1</td>
+<td>T3.A2</td>
+</tr>
+</tbody>
+</table>
+
+</chapter>
+
+</book>
diff --git a/docbook/relaxng/docbook/tests/unit-tests/rfe1630203.xml b/docbook/relaxng/docbook/tests/unit-tests/rfe1630203.xml
new file mode 100644 (file)
index 0000000..e1887b7
--- /dev/null
@@ -0,0 +1,14 @@
+<book xmlns="http://docbook.org/ns/docbook"
+      xmlns:xlink="http://www.w3.org/1999/xlink">
+<title>Sample book title</title>
+
+<chapter>
+<title>Sample chapter title</title>
+
+<para>This unit test contains an empty <tag>glossary</tag>, per
+<link xlink:href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1630203&amp;group_id=21935&amp;atid=384107"/>.</para>
+</chapter>
+
+<glossary/>
+
+</book>
index 7d0307c9ae415a51ccbdddfa505620fdb87a2967..4a777e1e6dd8379da169cb3d3af667c7095e7d1b 100755 (executable)
@@ -17,22 +17,39 @@ fi
 
 
 if [ "$XMLFILES" = "" ]; then
+    if [ -d unit-tests ]; then
+       for f in unit-tests/*.xml; do
+           XMLFILES="$XMLFILES `basename $f`"
+       done
+    fi
+
     for f in $SRCDIR/*.xml; do
        XMLFILES="$XMLFILES `basename $f`"
     done
 fi
 
 for f in $XMLFILES; do
+    srcfile=$f
+    if [ -f $SRCDIR/$f ]; then
+       srcfile=$SRCDIR/$f
+    elif [ -f unit-tests/$f ]; then
+       srcfile=unit-tests/$f
+    fi
+
     REBUILD=1
-    if [ ! -f $SRCDIR/$f ]; then
+    if [ "$f" = "$srcfile" ]; then
+       REBUILD=0
+    fi
+
+    if [ -f $f -a $f -nt $srcfile -a $f -nt $DB4UPG ]; then
        REBUILD=0
     fi
 
-    if [ -f $f -a $f -nt $SRCDIR/$f -a $f -nt $DB4UPG ]; then
+    if [ -f passed/$f -a passed/$f -nt $srcfile -a passed/$f -nt $DB4UPG ]; then
        REBUILD=0
     fi
 
-    if [ -f passed/$f -a passed/$f -nt $SRCDIR/$f -a passed/$f -nt $DB4UPG ]; then
+    if grep -e "xmlns\(:[^=]+\)\?=\(.\)http://docbook.org/ns/docbook\2" $srcfile > /dev/null; then
        REBUILD=0
     fi
 
@@ -40,7 +57,9 @@ for f in $XMLFILES; do
 
        if [ "$REBUILD" != "0" ]; then
            echo -n "Update $f..."
-           xsltproc --novalid --output $f $DB4UPG $SRCDIR/$f
+           xsltproc --novalid --output $f $DB4UPG $srcfile
+       elif [ ! -f $f -a "$f" != "$srcfile" ]; then
+           cp $srcfile $f
        fi
 
        if [ ! -f passed/$f -o $f -nt passed/$f ]; then