aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-22 18:49:23 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-22 18:49:23 +0000
commitc9e89e17934c6ead71e7b3e2d0ceb068963026fa (patch)
tree8b5352bcec8cf4fb9d25231fb0a868431f9bea5b
parent9ddd464a7e6a434380a52ef69b97850e0cead138 (diff)
downloadpandoc-c9e89e17934c6ead71e7b3e2d0ceb068963026fa.tar.gz
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
-rw-r--r--tests/testsuite.native4
-rw-r--r--tests/testsuite.txt9
-rw-r--r--tests/writer.context8
-rw-r--r--tests/writer.docbook16
-rw-r--r--tests/writer.html30
-rw-r--r--tests/writer.latex10
-rw-r--r--tests/writer.man9
-rw-r--r--tests/writer.markdown9
-rw-r--r--tests/writer.native4
-rw-r--r--tests/writer.rst11
-rw-r--r--tests/writer.rtf4
11 files changed, 113 insertions, 1 deletions
diff --git a/tests/testsuite.native b/tests/testsuite.native
index 9df680dcf..3fc3cbfd7 100644
--- a/tests/testsuite.native
+++ b/tests/testsuite.native
@@ -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 "."]]
diff --git a/tests/testsuite.txt b/tests/testsuite.txt
index cbe46cf70..af823ff57 100644
--- a/tests/testsuite.txt
+++ b/tests/testsuite.txt
@@ -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
diff --git a/tests/writer.context b/tests/writer.context
index cfb26cd65..d4e07fb43 100644
--- a/tests/writer.context
+++ b/tests/writer.context
@@ -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}
diff --git a/tests/writer.docbook b/tests/writer.docbook
index e9c425197..7d5b72abd 100644
--- a/tests/writer.docbook
+++ b/tests/writer.docbook
@@ -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>
diff --git a/tests/writer.html b/tests/writer.html
index 10d1c0c4f..fb501fdbf 100644
--- a/tests/writer.html
+++ b/tests/writer.html
@@ -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
diff --git a/tests/writer.latex b/tests/writer.latex
index e95972670..5c52a4cd7 100644
--- a/tests/writer.latex
+++ b/tests/writer.latex
@@ -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}
diff --git a/tests/writer.man b/tests/writer.man
index ae5a371f0..d314f3025 100644
--- a/tests/writer.man
+++ b/tests/writer.man
@@ -491,6 +491,15 @@ So is \f[B]\f[I]this\f[]\f[] word\.
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
.PP
diff --git a/tests/writer.markdown b/tests/writer.markdown
index 97c0ab229..e66514549 100644
--- a/tests/writer.markdown
+++ b/tests/writer.markdown
@@ -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.
+
* * * * *
diff --git a/tests/writer.native b/tests/writer.native
index 9df680dcf..3fc3cbfd7 100644
--- a/tests/writer.native
+++ b/tests/writer.native
@@ -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 "."]]
diff --git a/tests/writer.rst b/tests/writer.rst
index db6332047..9d9938eaa 100644
--- a/tests/writer.rst
+++ b/tests/writer.rst
@@ -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
diff --git a/tests/writer.rtf b/tests/writer.rtf
index 4b6f184f4..65ca0ce6c 100644
--- a/tests/writer.rtf
+++ b/tests/writer.rtf
@@ -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}