Updated test suite with new tests for definition lists.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@597 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-05-10 22:04:36 +00:00
parent f9731108e8
commit 5660e6ba11
9 changed files with 538 additions and 0 deletions

View file

@ -151,6 +151,51 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
[ [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"] ] [ [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"] ]
, [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"] ] ] ] ] , [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"] ] ] ] ]
, HorizontalRule , HorizontalRule
, Header 1 [Str "Definition",Space,Str "Lists"]
, Para [Str "Tight",Space,Str "using",Space,Str "spaces:"]
, DefinitionList
[ ([Str "apple"],
[ Plain [Str "red",Space,Str "fruit"] ]
),
([Str "orange"],
[ Plain [Str "orange",Space,Str "fruit"] ]
),
([Str "banana"],
[ Plain [Str "yellow",Space,Str "fruit"] ]
) ]
, Para [Str "Tight",Space,Str "using",Space,Str "tabs:"]
, DefinitionList
[ ([Str "apple"],
[ Plain [Str "red",Space,Str "fruit"] ]
),
([Str "orange"],
[ Plain [Str "orange",Space,Str "fruit"] ]
),
([Str "banana"],
[ Plain [Str "yellow",Space,Str "fruit"] ]
) ]
, Para [Str "Loose:"]
, DefinitionList
[ ([Str "apple"],
[ Para [Str "red",Space,Str "fruit"] ]
),
([Str "orange"],
[ Para [Str "orange",Space,Str "fruit"] ]
),
([Str "banana"],
[ Para [Str "yellow",Space,Str "fruit"] ]
) ]
, Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"]
, DefinitionList
[ ([Emph [Str "apple"]],
[ Para [Str "red",Space,Str "fruit"]
, Para [Str "contains",Space,Str "seeds,",Space,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"] ] ),
([Emph [Str "orange"]],
[ Para [Str "orange",Space,Str "fruit"]
, CodeBlock "{ orange code block }"
, BlockQuote
[ Para [Str "orange",Space,Str "block",Space,Str "quote"] ]
] ) ]
, Header 1 [Str "HTML",Space,Str "Blocks"] , Header 1 [Str "HTML",Space,Str "Blocks"]
, Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"] , Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
, RawHtml "<div>" , RawHtml "<div>"

View file

@ -257,6 +257,52 @@ Same thing but with paragraphs:
* * * * * * * * * *
# Definition Lists
Tight using spaces:
apple
: red fruit
orange
: orange fruit
banana
: yellow fruit
Tight using tabs:
apple
: red fruit
orange
: orange fruit
banana
: yellow fruit
Loose:
apple
: red fruit
orange
: orange fruit
banana
: yellow fruit
Multiple blocks with italics:
*apple*
: red fruit
: contains seeds,
crisp, pleasant to taste
*orange*
: orange fruit
: { orange code block }
: > orange block quote
# HTML Blocks # HTML Blocks
Simple block on one line: Simple block on one line:

View file

@ -549,6 +549,150 @@ These should not be escaped: \$ \\ \&gt; \[ \{
</itemizedlist> </itemizedlist>
</section> </section>
</section> </section>
<section>
<title>Definition Lists</title>
<para>
Tight using spaces:
</para>
<variablelist>
<varlistentry>
<term>
apple
</term>
<listitem>
<para>
red fruit
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
orange
</term>
<listitem>
<para>
orange fruit
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
banana
</term>
<listitem>
<para>
yellow fruit
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Tight using tabs:
</para>
<variablelist>
<varlistentry>
<term>
apple
</term>
<listitem>
<para>
red fruit
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
orange
</term>
<listitem>
<para>
orange fruit
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
banana
</term>
<listitem>
<para>
yellow fruit
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Loose:
</para>
<variablelist>
<varlistentry>
<term>
apple
</term>
<listitem>
<para>
red fruit
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
orange
</term>
<listitem>
<para>
orange fruit
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
banana
</term>
<listitem>
<para>
yellow fruit
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Multiple blocks with italics:
</para>
<variablelist>
<varlistentry>
<term>
<emphasis>apple</emphasis>
</term>
<listitem>
<para>
red fruit
</para>
<para>
contains seeds, crisp, pleasant to taste
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis>orange</emphasis>
</term>
<listitem>
<para>
orange fruit
</para>
<screen>
{ orange code block }
</screen>
<blockquote>
<para>
orange block quote
</para>
</blockquote>
</listitem>
</varlistentry>
</variablelist>
</section>
<section> <section>
<title>Inline Markup</title> <title>Inline Markup</title>
<para> <para>

View file

@ -388,6 +388,93 @@ These should not be escaped: \$ \\ \&gt; \[ \{
></ul ></ul
><hr ><hr
/><h1 /><h1
>Definition Lists</h1
><p
>Tight using spaces:</p
><dl
><dt
>apple</dt
><dd
>red fruit</dd
><dt
>orange</dt
><dd
>orange fruit</dd
><dt
>banana</dt
><dd
>yellow fruit</dd
></dl
><p
>Tight using tabs:</p
><dl
><dt
>apple</dt
><dd
>red fruit</dd
><dt
>orange</dt
><dd
>orange fruit</dd
><dt
>banana</dt
><dd
>yellow fruit</dd
></dl
><p
>Loose:</p
><dl
><dt
>apple</dt
><dd
><p
>red fruit</p
></dd
><dt
>orange</dt
><dd
><p
>orange fruit</p
></dd
><dt
>banana</dt
><dd
><p
>yellow fruit</p
></dd
></dl
><p
>Multiple blocks with italics:</p
><dl
><dt
><em
>apple</em
></dt
><dd
><p
>red fruit</p
><p
>contains seeds, crisp, pleasant to taste</p
></dd
><dt
><em
>orange</em
></dt
><dd
><p
>orange fruit</p
><pre
><code
>{ orange code block }
</code
></pre
><blockquote
><p
>orange block quote</p
></blockquote
></dd
></dl
><h1
>HTML Blocks</h1 >HTML Blocks</h1
><p ><p
>Simple block on one line:</p >Simple block on one line:</p

View file

@ -304,6 +304,49 @@ Same thing but with paragraphs:
\end{itemize} \end{itemize}
\begin{center}\rule{3in}{0.4pt}\end{center} \begin{center}\rule{3in}{0.4pt}\end{center}
\section{Definition Lists}
Tight using spaces:
\begin{description}
\item[apple] red fruit
\item[orange] orange fruit
\item[banana] yellow fruit
\end{description}
Tight using tabs:
\begin{description}
\item[apple] red fruit
\item[orange] orange fruit
\item[banana] yellow fruit
\end{description}
Loose:
\begin{description}
\item[apple] red fruit
\item[orange] orange fruit
\item[banana] yellow fruit
\end{description}
Multiple blocks with italics:
\begin{description}
\item[\emph{apple}] red fruit
contains seeds, crisp, pleasant to taste
\item[\emph{orange}] orange fruit
\begin{verbatim}
{ orange code block }
\end{verbatim}
\begin{quote}
orange block quote
\end{quote}
\end{description}
\section{HTML Blocks} \section{HTML Blocks}
Simple block on one line: Simple block on one line:

View file

@ -256,6 +256,53 @@ Same thing but with paragraphs:
* * * * * * * * * *
# Definition Lists
Tight using spaces:
apple
: red fruit
orange
: orange fruit
banana
: yellow fruit
Tight using tabs:
apple
: red fruit
orange
: orange fruit
banana
: yellow fruit
Loose:
apple
: red fruit
orange
: orange fruit
banana
: yellow fruit
Multiple blocks with italics:
*apple*
: red fruit
: contains seeds, crisp, pleasant to taste
*orange*
: orange fruit
: { orange code block }
: > orange block quote
# HTML Blocks # HTML Blocks
Simple block on one line: Simple block on one line:

View file

@ -151,6 +151,51 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
[ [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"] ] [ [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"] ]
, [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"] ] ] ] ] , [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"] ] ] ] ]
, HorizontalRule , HorizontalRule
, Header 1 [Str "Definition",Space,Str "Lists"]
, Para [Str "Tight",Space,Str "using",Space,Str "spaces:"]
, DefinitionList
[ ([Str "apple"],
[ Plain [Str "red",Space,Str "fruit"] ]
),
([Str "orange"],
[ Plain [Str "orange",Space,Str "fruit"] ]
),
([Str "banana"],
[ Plain [Str "yellow",Space,Str "fruit"] ]
) ]
, Para [Str "Tight",Space,Str "using",Space,Str "tabs:"]
, DefinitionList
[ ([Str "apple"],
[ Plain [Str "red",Space,Str "fruit"] ]
),
([Str "orange"],
[ Plain [Str "orange",Space,Str "fruit"] ]
),
([Str "banana"],
[ Plain [Str "yellow",Space,Str "fruit"] ]
) ]
, Para [Str "Loose:"]
, DefinitionList
[ ([Str "apple"],
[ Para [Str "red",Space,Str "fruit"] ]
),
([Str "orange"],
[ Para [Str "orange",Space,Str "fruit"] ]
),
([Str "banana"],
[ Para [Str "yellow",Space,Str "fruit"] ]
) ]
, Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"]
, DefinitionList
[ ([Emph [Str "apple"]],
[ Para [Str "red",Space,Str "fruit"]
, Para [Str "contains",Space,Str "seeds,",Space,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"] ] ),
([Emph [Str "orange"]],
[ Para [Str "orange",Space,Str "fruit"]
, CodeBlock "{ orange code block }"
, BlockQuote
[ Para [Str "orange",Space,Str "block",Space,Str "quote"] ]
] ) ]
, Header 1 [Str "HTML",Space,Str "Blocks"] , Header 1 [Str "HTML",Space,Str "Blocks"]
, Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"] , Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
, RawHtml "<div>" , RawHtml "<div>"

View file

@ -287,6 +287,57 @@ Tabs and spaces
-------------- --------------
Definition Lists
================
Tight using spaces:
apple
red fruit
orange
orange fruit
banana
yellow fruit
Tight using tabs:
apple
red fruit
orange
orange fruit
banana
yellow fruit
Loose:
apple
red fruit
orange
orange fruit
banana
yellow fruit
Multiple blocks with italics:
*apple*
red fruit
contains seeds, crisp, pleasant to taste
*orange*
orange fruit
::
{ orange code block }
orange block quote
HTML Blocks HTML Blocks
=========== ===========

View file

@ -141,6 +141,36 @@ These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par}
{\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with tabs\par} {\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with tabs\par}
{\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with spaces\sa180\sa180\par} {\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with spaces\sa180\sa180\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Definition Lists\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Tight using spaces:\par}
{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}
{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par}
{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}
{\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par}
{\pard \ql \f0 \sa0 \li0 \fi0 banana\par}
{\pard \ql \f0 \sa0 \li360 \fi0 yellow fruit\sa180\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Tight using tabs:\par}
{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}
{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par}
{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}
{\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par}
{\pard \ql \f0 \sa0 \li0 \fi0 banana\par}
{\pard \ql \f0 \sa0 \li360 \fi0 yellow fruit\sa180\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Loose:\par}
{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}
{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par}
{\pard \ql \f0 \sa0 \li0 \fi0 orange\par}
{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par}
{\pard \ql \f0 \sa0 \li0 \fi0 banana\par}
{\pard \ql \f0 \sa180 \li360 \fi0 yellow fruit\sa180\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Multiple blocks with italics:\par}
{\pard \ql \f0 \sa0 \li0 \fi0 {\i apple} \par}
{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par}
{\pard \ql \f0 \sa180 \li360 \fi0 contains seeds, crisp, pleasant to taste\par}
{\pard \ql \f0 \sa0 \li0 \fi0 {\i orange} \par}
{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par}
{\pard \ql \f0 \sa180 \li360 \fi0 \f1 \{ orange code block \}\par}
{\pard \ql \f0 \sa180 \li1080 \fi0 orange block quote\sa180\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 HTML Blocks\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 HTML Blocks\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Simple block on one line:\par} {\pard \ql \f0 \sa180 \li0 \fi0 Simple block on one line:\par}
{\pard \ql \f0 \sa0 \li0 \fi0 foo\par} {\pard \ql \f0 \sa0 \li0 \fi0 foo\par}