Updated test suite for writers, adding tests for

strikeout, superscript, subscript.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@766 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-07-22 18:49:23 +00:00
parent 9ddd464a7e
commit c9e89e1793
11 changed files with 113 additions and 1 deletions

View file

@ -247,6 +247,10 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
, Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
, Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
, Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
, Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
, Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Str " ",Str "there"],Str "."]
, Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many",Str " ",Str "of",Str " ",Str "them"],Str "O",Str "."]
, Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a",Str "^",Str "b",Space,Str "c",Str "^",Str "d,",Space,Str "a",Str "~",Str "b",Space,Str "c",Str "~",Str "d",Str "."]
, HorizontalRule
, Header 1 [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
, Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider",Str ".",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name",Str "."]]

View file

@ -424,6 +424,15 @@ So is ___this___ word.
This is code: `>`, `$`, `\`, `\$`, `<html>`.
~~This is *strikeout*.~~
Superscripts: a^bc^d a^*hello*^ a^hello\ there^.
Subscripts: H~2~O, H~23~O, H~many\ of\ them~O.
These should not be superscripts or subscripts,
because of the unescaped spaces: a^b c^d, a~b c~d.
-----
# Smart quotes, ellipses, dashes

View file

@ -503,6 +503,14 @@ So is {\bf {\em this}} word.
This is code: \type{>}, \type{$}, \type{\}, \type{\$}, \type{<html>}.
\overstrikes{This is {\em strikeout}.}
Superscripts: a\high{bc}d a\high{{\em hello}} a\high{hello there}.
Subscripts: H\low{2}O, H\low{23}O, H\low{many of them}O.
These should not be superscripts or subscripts, because of the unescaped spaces: a\letterhat{}b c\letterhat{}d, a\lettertilde{}b c\lettertilde{}d.
\thinrule
\section{Smart quotes, ellipses, dashes}

View file

@ -725,6 +725,22 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<literal>\</literal>, <literal>\$</literal>,
<literal>&lt;html&gt;</literal>.
</para>
<para>
<emphasis role="strikethrough">This is <emphasis>strikeout</emphasis>.</emphasis>
</para>
<para>
Superscripts: a<superscript>bc</superscript>d
a<superscript><emphasis>hello</emphasis></superscript>
a<superscript>hello there</superscript>.
</para>
<para>
Subscripts: H<subscript>2</subscript>O,
H<subscript>23</subscript>O, H<subscript>many of them</subscript>O.
</para>
<para>
These should not be superscripts or subscripts, because of the
unescaped spaces: a^b c^d, a~b c~d.
</para>
</section>
<section>
<title>Smart quotes, ellipses, dashes</title>

View file

@ -8,7 +8,9 @@
/><meta name="author" content="John MacFarlane"
/><meta name="author" content="Anonymous"
/><meta name="date" content="July 17, 2006"
/></head
/><style type="text/css"
>.strikeout { text-decoration: line-through; }</style
></head
><body
><h1 class="title"
>Pandoc Test Suite</h1
@ -635,6 +637,32 @@ Blah
>, <code
>&lt;html&gt;</code
>.</p
><p
><span class="strikeout"
>This is <em
>strikeout</em
>.</span
></p
><p
>Superscripts: a<sup
>bc</sup
>d a<sup
><em
>hello</em
></sup
> a<sup
>hello there</sup
>.</p
><p
>Subscripts: H<sub
>2</sub
>O, H<sub
>23</sub
>O, H<sub
>many of them</sub
>O.</p
><p
>These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</p
><hr
/><h1 id="smart-quotes-ellipses-dashes"
>Smart quotes, ellipses, dashes</h1

View file

@ -6,7 +6,9 @@
% This is needed for code blocks in footnotes:
\usepackage{fancyvrb}
\VerbatimFootnotes
\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
\usepackage[breaklinks=true]{hyperref}
\usepackage[normalem]{ulem}
\usepackage{graphicx}
\setcounter{secnumdepth}{0}
\title{Pandoc Test Suite}
@ -413,6 +415,14 @@ So is \textbf{\emph{this}} word.
This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!, \verb!<html>!.
\sout{This is \emph{strikeout}.}
Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
Subscripts: H\textsubscript{2}O, H\textsubscript{23}O, H\textsubscript{many of them}O.
These should not be superscripts or subscripts, because of the unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b c\ensuremath{\sim}d.
\begin{center}\rule{3in}{0.4pt}\end{center}
\section{Smart quotes, ellipses, dashes}

View file

@ -490,6 +490,15 @@ So is \f[B]\f[I]this\f[]\f[] word\.
.PP
This is code: \f[B]>\f[], \f[B]$\f[], \f[B]\\\f[], \f[B]\\$\f[],
\f[B]<html>\f[]\.
.PP
[STRIKEOUT:This is \f[I]strikeout\f[]\.]
.PP
Superscripts: a^bc^d a^\f[I]hello\f[]^ a^hello there^\.
.PP
Subscripts: H~2~O, H~23~O, H~many of them~O\.
.PP
These should not be superscripts or subscripts, because of the
unescaped spaces: a^b c^d, a~b c~d\.
.PP
* * * * *
.SH Smart quotes, ellipses, dashes

View file

@ -435,6 +435,15 @@ So is ***this*** word.
This is code: `>`, `$`, `\`, `\$`, `<html>`.
~~This is *strikeout*.~~
Superscripts: a^bc^d a^*hello*^ a^hello\ there^.
Subscripts: H~2~O, H~23~O, H~many\ of\ them~O.
These should not be superscripts or subscripts, because of the
unescaped spaces: a\^b c\^d, a\~b c\~d.
* * * * *

View file

@ -247,6 +247,10 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
, Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
, Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
, Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
, Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
, Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Str " ",Str "there"],Str "."]
, Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many",Str " ",Str "of",Str " ",Str "them"],Str "O",Str "."]
, Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a",Str "^",Str "b",Space,Str "c",Str "^",Str "d,",Space,Str "a",Str "~",Str "b",Space,Str "c",Str "~",Str "d",Str "."]
, HorizontalRule
, Header 1 [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
, Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider",Str ".",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name",Str "."]]

View file

@ -534,6 +534,17 @@ So is ***this*** word.
This is code: ``>``, ``$``, ``\``, ``\$``, ``<html>``.
[STRIKEOUT:This is *strikeout*.]
Superscripts: a\ :sup:`bc`\ d a\ :sup:`*hello*`\
a\ :sup:`hello there`\ .
Subscripts: H\ :sub:`2`\ O, H\ :sub:`23`\ O,
H\ :sub:`many of them`\ O.
These should not be superscripts or subscripts, because of the
unescaped spaces: a^b c^d, a~b c~d.
--------------
Smart quotes, ellipses, dashes

View file

@ -211,6 +211,10 @@ emphasized link
{\pard \ql \f0 \sa180 \li0 \fi0 {\b {\i This is strong and em.} } \par}
{\pard \ql \f0 \sa180 \li0 \fi0 So is {\b {\i this} } word.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 This is code: {\f1 >} , {\f1 $} , {\f1 \\} , {\f1 \\$} , {\f1 <html>} .\par}
{\pard \ql \f0 \sa180 \li0 \fi0 {\strike This is {\i strikeout} .} \par}
{\pard \ql \f0 \sa180 \li0 \fi0 Superscripts: a{\super bc} d a{\super {\i hello} } a{\super hello there} .\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Subscripts: H{\sub 2} O, H{\sub 23} O, H{\sub many of them} O.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Smart quotes, ellipses, dashes\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \u8220"Hello,\u8221" said the spider. \u8220"\u8216'Shelob\u8217' is my name.\u8221"\par}