git.iko.soy/typeable/pandoc
on master help sign in
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

commitc9e89e17934c6ead71e7b3e2d0ceb068963026fa authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 22 Jul 2007, 18:49 (19 years ago) parent9ddd464
11 files changed+113−1
tests/testsuite.native+4 tests/testsuite.txt+9 tests/writer.context+8 tests/writer.docbook+16 tests/writer.html+29−1 tests/writer.latex+10 tests/writer.man+9 tests/writer.markdown+9 tests/writer.native+4 tests/writer.rst+11 tests/writer.rtf+4
tests/testsuite.native+4
@@ -247,6 +247,10 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
247247, Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
248248, Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
249249, 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 "."]
250+, Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
251+, 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 "."]
252+, 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 "."]
253+, 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 "."]
250254, HorizontalRule
251255, Header 1 [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
252256, 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 "."]]
tests/testsuite.txt+9
@@ -424,6 +424,15 @@ So is ___this___ word.
424424
425425This is code: `>`, `$`, `\`, `\$`, `<html>`.
426426
427+~~This is *strikeout*.~~
428+
429+Superscripts: a^bc^d a^*hello*^ a^hello\ there^.
430+
431+Subscripts: H~2~O, H~23~O, H~many\ of\ them~O.
432+
433+These should not be superscripts or subscripts,
434+because of the unescaped spaces: a^b c^d, a~b c~d.
435+
427436-----
428437
429438# Smart quotes, ellipses, dashes
tests/writer.context+8
@@ -503,6 +503,14 @@ So is {\bf {\em this}} word.
503503
504504This is code: \type{>}, \type{$}, \type{\}, \type{\$}, \type{<html>}.
505505
506+\overstrikes{This is {\em strikeout}.}
507+
508+Superscripts: a\high{bc}d a\high{{\em hello}} a\high{hello there}.
509+
510+Subscripts: H\low{2}O, H\low{23}O, H\low{many of them}O.
511+
512+These should not be superscripts or subscripts, because of the unescaped spaces: a\letterhat{}b c\letterhat{}d, a\lettertilde{}b c\lettertilde{}d.
513+
506514\thinrule
507515
508516\section{Smart quotes, ellipses, dashes}
tests/writer.docbook+16
@@ -725,6 +725,22 @@ These should not be escaped: \$ \\ \&gt; \[ \{
725725 <literal>\</literal>, <literal>\$</literal>,
726726 <literal>&lt;html&gt;</literal>.
727727 </para>
728+ <para>
729+ <emphasis role="strikethrough">This is <emphasis>strikeout</emphasis>.</emphasis>
730+ </para>
731+ <para>
732+ Superscripts: a<superscript>bc</superscript>d
733+ a<superscript><emphasis>hello</emphasis></superscript>
734+ a<superscript>hello there</superscript>.
735+ </para>
736+ <para>
737+ Subscripts: H<subscript>2</subscript>O,
738+ H<subscript>23</subscript>O, H<subscript>many of them</subscript>O.
739+ </para>
740+ <para>
741+ These should not be superscripts or subscripts, because of the
742+ unescaped spaces: a^b c^d, a~b c~d.
743+ </para>
728744 </section>
729745 <section>
730746 <title>Smart quotes, ellipses, dashes</title>
tests/writer.html+29−1
@@ -8,7 +8,9 @@
88 /><meta name="author" content="John MacFarlane"
99 /><meta name="author" content="Anonymous"
1010 /><meta name="date" content="July 17, 2006"
11− /></head
11+ /><style type="text/css"
12+ >.strikeout { text-decoration: line-through; }</style
13+ ></head
1214 ><body
1315 ><h1 class="title"
1416 >Pandoc Test Suite</h1
@@ -635,6 +637,32 @@ Blah
635637 >, <code
636638 >&lt;html&gt;</code
637639 >.</p
640+ ><p
641+ ><span class="strikeout"
642+ >This is <em
643+ >strikeout</em
644+ >.</span
645+ ></p
646+ ><p
647+ >Superscripts: a<sup
648+ >bc</sup
649+ >d a<sup
650+ ><em
651+ >hello</em
652+ ></sup
653+ > a<sup
654+ >hello there</sup
655+ >.</p
656+ ><p
657+ >Subscripts: H<sub
658+ >2</sub
659+ >O, H<sub
660+ >23</sub
661+ >O, H<sub
662+ >many of them</sub
663+ >O.</p
664+ ><p
665+ >These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</p
638666 ><hr
639667 /><h1 id="smart-quotes-ellipses-dashes"
640668 >Smart quotes, ellipses, dashes</h1
tests/writer.latex+10
@@ -6,7 +6,9 @@
66% This is needed for code blocks in footnotes:
77\usepackage{fancyvrb}
88\VerbatimFootnotes
9+\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
910\usepackage[breaklinks=true]{hyperref}
11+\usepackage[normalem]{ulem}
1012\usepackage{graphicx}
1113\setcounter{secnumdepth}{0}
1214\title{Pandoc Test Suite}
@@ -413,6 +415,14 @@ So is \textbf{\emph{this}} word.
413415
414416This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!, \verb!<html>!.
415417
418+\sout{This is \emph{strikeout}.}
419+
420+Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
421+
422+Subscripts: H\textsubscript{2}O, H\textsubscript{23}O, H\textsubscript{many of them}O.
423+
424+These should not be superscripts or subscripts, because of the unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b c\ensuremath{\sim}d.
425+
416426\begin{center}\rule{3in}{0.4pt}\end{center}
417427
418428\section{Smart quotes, ellipses, dashes}
tests/writer.man+9
@@ -490,6 +490,15 @@ So is \f[B]\f[I]this\f[]\f[] word\.
490490.PP
491491This is code: \f[B]>\f[], \f[B]$\f[], \f[B]\\\f[], \f[B]\\$\f[],
492492\f[B]<html>\f[]\.
493+.PP
494+[STRIKEOUT:This is \f[I]strikeout\f[]\.]
495+.PP
496+Superscripts: a^bc^d a^\f[I]hello\f[]^ a^hello there^\.
497+.PP
498+Subscripts: H~2~O, H~23~O, H~many of them~O\.
499+.PP
500+These should not be superscripts or subscripts, because of the
501+unescaped spaces: a^b c^d, a~b c~d\.
493502.PP
494503 * * * * *
495504.SH Smart quotes, ellipses, dashes
tests/writer.markdown+9
@@ -435,6 +435,15 @@ So is ***this*** word.
435435
436436This is code: `>`, `$`, `\`, `\$`, `<html>`.
437437
438+~~This is *strikeout*.~~
439+
440+Superscripts: a^bc^d a^*hello*^ a^hello\ there^.
441+
442+Subscripts: H~2~O, H~23~O, H~many\ of\ them~O.
443+
444+These should not be superscripts or subscripts, because of the
445+unescaped spaces: a\^b c\^d, a\~b c\~d.
446+
438447
439448* * * * *
440449
tests/writer.native+4
@@ -247,6 +247,10 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
247247, Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]]
248248, Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."]
249249, 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 "."]
250+, Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
251+, 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 "."]
252+, 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 "."]
253+, 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 "."]
250254, HorizontalRule
251255, Header 1 [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
252256, 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 "."]]
tests/writer.rst+11
@@ -534,6 +534,17 @@ So is ***this*** word.
534534
535535This is code: ``>``, ``$``, ``\``, ``\$``, ``<html>``.
536536
537+[STRIKEOUT:This is *strikeout*.]
538+
539+Superscripts: a\ :sup:`bc`\ d a\ :sup:`*hello*`\
540+a\ :sup:`hello there`\ .
541+
542+Subscripts: H\ :sub:`2`\ O, H\ :sub:`23`\ O,
543+H\ :sub:`many of them`\ O.
544+
545+These should not be superscripts or subscripts, because of the
546+unescaped spaces: a^b c^d, a~b c~d.
547+
537548--------------
538549
539550Smart quotes, ellipses, dashes
tests/writer.rtf+4
@@ -211,6 +211,10 @@ emphasized link
211211{\pard \ql \f0 \sa180 \li0 \fi0 {\b {\i This is strong and em.} } \par}
212212{\pard \ql \f0 \sa180 \li0 \fi0 So is {\b {\i this} } word.\par}
213213{\pard \ql \f0 \sa180 \li0 \fi0 This is code: {\f1 >} , {\f1 $} , {\f1 \\} , {\f1 \\$} , {\f1 <html>} .\par}
214+{\pard \ql \f0 \sa180 \li0 \fi0 {\strike This is {\i strikeout} .} \par}
215+{\pard \ql \f0 \sa180 \li0 \fi0 Superscripts: a{\super bc} d a{\super {\i hello} } a{\super hello there} .\par}
216+{\pard \ql \f0 \sa180 \li0 \fi0 Subscripts: H{\sub 2} O, H{\sub 23} O, H{\sub many of them} O.\par}
217+{\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}
214218{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
215219{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Smart quotes, ellipses, dashes\par}
216220{\pard \ql \f0 \sa180 \li0 \fi0 \u8220"Hello,\u8221" said the spider. \u8220"\u8216'Shelob\u8217' is my name.\u8221"\par}