Added test case for lists.
authorArjen Baart <arjen@andromeda.nl>
Sun, 18 Aug 2019 16:38:45 +0000 (18:38 +0200)
committerArjen Baart <arjen@andromeda.nl>
Sun, 18 Aug 2019 16:38:45 +0000 (18:38 +0200)
ChangeLog
doc/Makefile.am
doc/Makefile.in
test/Makefile.am
test/Makefile.in
test/lists [new file with mode: 0755]
test/lists.html.exp [new file with mode: 0644]
test/lists.tex.exp [new file with mode: 0644]
test/lists.xml [new file with mode: 0644]

index e3edb44..442f046 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ Version 0.9 - Aug 17, 2019
 ===========================================================
 
 o Fixed LaTeX special characters
+o Added test for lists
 
 Version 0.8 - Jul 26, 2019
 ===========================================================
index 13a3ca1..fa38dee 100644 (file)
@@ -37,7 +37,7 @@ guide.pdf : $(XMLS)  $(PICTURES) ../latex.xsl ../xp
 guide.txt : $(XMLS) ../text.xsl
        ../xp ../text.xsl guide.xml > guide.txt
 
-check:
+validate:
        xmllint --noout --xinclude --loaddtd --noent --schema ../doc.xsd guide.xml
 #      xmllint --noout --valid $(XMLS)
 
index 59ca836..14e30ef 100644 (file)
@@ -427,7 +427,7 @@ guide.pdf : $(XMLS)  $(PICTURES) ../latex.xsl ../xp
 guide.txt : $(XMLS) ../text.xsl
        ../xp ../text.xsl guide.xml > guide.txt
 
-check:
+validate:
        xmllint --noout --xinclude --loaddtd --noent --schema ../doc.xsd guide.xml
 #      xmllint --noout --valid $(XMLS)
 
index d571475..c3de07b 100644 (file)
@@ -1,4 +1,4 @@
-TESTS = basic title titlepage sections toc paragraph specialchars
+TESTS = basic title titlepage sections toc paragraph lists specialchars
 
 clean-local:
        rm -f *.html *.tex *.aux *.dvi *.pdf
index dbb83c1..3949a09 100644 (file)
@@ -408,7 +408,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-TESTS = basic title titlepage sections toc paragraph specialchars
+TESTS = basic title titlepage sections toc paragraph lists specialchars
 all: all-am
 
 .SUFFIXES:
@@ -632,6 +632,13 @@ paragraph.log: paragraph
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+lists.log: lists
+       @p='lists'; \
+       b='lists'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 specialchars.log: specialchars
        @p='specialchars'; \
        b='specialchars'; \
diff --git a/test/lists b/test/lists
new file mode 100755 (executable)
index 0000000..d65259d
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+./check lists
+
+exit $?
diff --git a/test/lists.html.exp b/test/lists.html.exp
new file mode 100644 (file)
index 0000000..03fb918
--- /dev/null
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta charset="utf-8"/>
+    <link rel="stylesheet" type="text/css" href="main.css"/>
+    <title>xmldoc lists check</title>
+    <style type="text/css">
+      .center
+      {
+         text-align : center ;
+      }
+      table.docinfo
+      {
+         margin-left  : 10% ;
+         margin-right : 10% ;
+         border-style : solid ;
+      }
+      th
+      {
+         border-style : solid ;
+         border-width : thin ;
+      }
+      h3.toc
+      {
+         margin-left : 2em ;
+      }
+      pre.example
+      {
+         border : solid ;
+         padding-bottom : 1em ;
+      }
+      span.red
+      {
+         color : red ;
+      }
+      span.green
+      {
+         color : green ;
+      }
+      span.blue
+      {
+         color : blue ;
+      }
+      span.cyan
+      {
+         color : cyan ;
+      }
+      span.magenta
+      {
+         color : magenta ;
+      }
+      span.yellow
+      {
+         color : yellow ;
+      }
+      span.orange
+      {
+         color : orange ;
+      }
+      span.violet
+      {
+         color : violet ;
+      }
+      span.purple
+      {
+         color : purple ;
+      }
+      span.brown
+      {
+         color : brown ;
+      }
+      span.pink
+      {
+         color : pink ;
+      }
+      span.olive
+      {
+         color : olive ;
+      }
+      span.black
+      {
+         color : black ;
+      }
+      span.darkgray
+      {
+         color : darkgray ;
+      }
+      span.gray
+      {
+         color : gray ;
+      }
+      span.lightgray
+      {
+         color : lightgray ;
+      }
+      span.white
+      {
+         color : white ;
+      }
+   </style>
+  </head>
+  <body>
+
+   <div class="titlepage">
+      <h1 class="titlepage">xmldoc lists check</h1>
+   </div>
+
+   <h1>1  <a id="CH1"/>Check 3 kinds of lists</h1><ul>
+         <li>
+           The itemize element
+         </li>
+         <li>
+           creates bulleted lists
+           <ul>
+             <li>
+               and can be nested
+             </li>
+          </ul>
+         </li>
+      </ul><ol>
+         <li>
+           The enumerate element
+         </li>
+         <li>
+           creates numbered lists
+           <ol>
+             <li>
+               and can also be nested
+             </li>
+          </ol>
+         </li>
+      </ol><dl>
+         <dt>first item</dt><dd>
+           The description element
+         </dd>
+         <dt>second item</dt><dd>
+           creates lists with description tags
+           <dl>
+             <dt>nested item</dt><dd>
+               and can be nested
+             </dd>
+          </dl>
+         </dd>
+      </dl>
+
+   <hr/></body>
+</html>
diff --git a/test/lists.tex.exp b/test/lists.tex.exp
new file mode 100644 (file)
index 0000000..392b000
--- /dev/null
@@ -0,0 +1,96 @@
+
+\documentclass[a4paper]{book}
+\usepackage{xcolor}
+\usepackage{graphics}
+\usepackage{latexsym}
+\usepackage{marvosym}
+\begin{document}
+   
+
+   
+   \begin{titlepage}
+   
+      
+   \begin{center}
+   \sffamily\bfseries\LARGE{xmldoc lists check}
+   \end{center}
+
+   
+   \end{titlepage}
+
+
+   
+   \chapter{Check 3 kinds of lists}
+
+\begin{itemize}
+   
+         
+\item 
+           The itemize element
+         
+         
+\item 
+           creates bulleted lists
+           
+\begin{itemize}
+   
+             
+\item 
+               and can be nested
+             
+          
+\end{itemize}
+
+         
+      
+\end{itemize}
+
+\begin{enumerate}
+   
+         
+\item 
+           The enumerate element
+         
+         
+\item 
+           creates numbered lists
+           
+\begin{enumerate}
+   
+             
+\item 
+               and can also be nested
+             
+          
+\end{enumerate}
+
+         
+      
+\end{enumerate}
+
+\begin{description}
+   
+         
+\item[first item] 
+           The description element
+         
+         
+\item[second item] 
+           creates lists with description tags
+           
+\begin{description}
+   
+             
+\item[nested item] 
+               and can be nested
+             
+          
+\end{description}
+
+         
+      
+\end{description}
+
+
+   
+\end{document}
diff --git a/test/lists.xml b/test/lists.xml
new file mode 100644 (file)
index 0000000..d325941
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+
+<doc style="main.css">
+
+   <book>
+
+   <titlepage>
+      <title>xmldoc lists check</title>
+   </titlepage>
+
+   <chapter>
+      <heading>Check 3 kinds of lists</heading>
+
+      <itemize>
+         <item>
+           The itemize element
+         </item>
+         <item>
+           creates bulleted lists
+           <itemize>
+             <item>
+               and can be nested
+             </item>
+          </itemize>
+         </item>
+      </itemize>
+
+      <enumerate>
+         <item>
+           The enumerate element
+         </item>
+         <item>
+           creates numbered lists
+           <enumerate>
+             <item>
+               and can also be nested
+             </item>
+          </enumerate>
+         </item>
+      </enumerate>
+
+      <description>
+         <item tag='first item'>
+           The description element
+         </item>
+         <item tag='second item'>
+           creates lists with description tags
+           <description>
+             <item tag='nested item'>
+               and can be nested
+             </item>
+          </description>
+         </item>
+      </description>
+
+   </chapter>
+
+   </book>
+
+</doc>