aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Markdown.hs3
-rw-r--r--tests/Tests/Readers/Org.hs27
-rw-r--r--tests/Tests/Writers/LaTeX.hs2
-rw-r--r--tests/pipe-tables.native13
-rw-r--r--tests/pipe-tables.txt7
-rw-r--r--tests/s5-basic.html8
-rw-r--r--tests/s5-fancy.html8
-rw-r--r--tests/tables.html6
-rw-r--r--tests/textile-reader.native16
-rw-r--r--tests/writer.asciidoc5
10 files changed, 73 insertions, 22 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs
index c24d2293f..f6afacb34 100644
--- a/tests/Tests/Readers/Markdown.hs
+++ b/tests/Tests/Readers/Markdown.hs
@@ -181,6 +181,9 @@ tests = [ testGroup "inline code"
, "technically invalid comment" =:
"<!-- pandoc --help -->" =?>
rawBlock "html" "<!-- pandoc --help -->"
+ , test markdownGH "issue 2469" $
+ "<\n\na>" =?>
+ para (text "<") <> para (text "a>")
]
, "unbalanced brackets" =:
"[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi")
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index b1aaaacad..66f284b28 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -264,6 +264,16 @@ tests =
)
"echo 'Hello, World'")
+ , "Inline code block with toggle" =:
+ "src_sh[:toggle]{echo $HOME}" =?>
+ (para $ codeWith ( ""
+ , [ "bash", "rundoc-block" ]
+ , [ ("rundoc-language", "sh")
+ , ("rundoc-toggle", "yes")
+ ]
+ )
+ "echo $HOME")
+
, "Citation" =:
"[@nonexistent]" =?>
let citation = Citation
@@ -870,6 +880,14 @@ tests =
, para "orange"
, para "peach"
]
+
+ , "Recognize preceding paragraphs in non-list contexts" =:
+ unlines [ "CLOSED: [2015-10-19 Mon 15:03]"
+ , "- Note taken on [2015-10-19 Mon 13:24]"
+ ] =?>
+ mconcat [ para "CLOSED: [2015-10-19 Mon 15:03]"
+ , bulletList [ plain "Note taken on [2015-10-19 Mon 13:24]" ]
+ ]
]
, testGroup "Tables"
@@ -1094,6 +1112,15 @@ tests =
, ": 65" ] =?>
rawBlock "html" ""
+ , "Source block with toggling header arguments" =:
+ unlines [ "#+BEGIN_SRC sh :noeval"
+ , "echo $HOME"
+ , "#+END_SRC"
+ ] =?>
+ let classes = [ "bash", "rundoc-block" ]
+ params = [ ("rundoc-language", "sh"), ("rundoc-noeval", "yes") ]
+ in codeBlockWith ("", classes, params) "echo $HOME\n"
+
, "Example block" =:
unlines [ "#+begin_example"
, "A chosen representation of"
diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs
index d1cfd3ddf..27931dc28 100644
--- a/tests/Tests/Writers/LaTeX.hs
+++ b/tests/Tests/Writers/LaTeX.hs
@@ -42,7 +42,7 @@ tests = [ testGroup "code blocks"
, testGroup "definition lists"
[ "with internal link" =: definitionList [(link "#go" "" (str "testing"),
[plain (text "hi there")])] =?>
- "\\begin{description}\n\\tightlist\n\\item[{\\hyperref[go]{testing}}]\nhi there\n\\end{description}"
+ "\\begin{description}\n\\tightlist\n\\item[\\protect\\hyperlink{go}{testing}]\nhi there\n\\end{description}"
]
, testGroup "math"
[ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?>
diff --git a/tests/pipe-tables.native b/tests/pipe-tables.native
index 9d499c9c2..f52175ff0 100644
--- a/tests/pipe-tables.native
+++ b/tests/pipe-tables.native
@@ -83,4 +83,15 @@
[[[Plain [Str "3"]]
,[Plain [Str "33"]]]
,[[Plain [Str "4"]]
- ,[Plain [Str "44"]]]]]
+ ,[Plain [Str "44"]]]]
+,Para [Str "Long",Space,Str "pipe",Space,Str "table",Space,Str "with",Space,Str "relative",Space,Str "widths:"]
+,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.125,0.1375,0.5]
+ [[Plain [Str "Default1"]]
+ ,[Plain [Str "Default2"]]
+ ,[Plain [Str "Default3"]]]
+ [[[Plain [Str "123"]]
+ ,[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "table",Space,Str "cell"]]
+ ,[Plain [Str "and",Space,Str "this",Space,Str "is",Space,Str "a",Space,Str "really",Space,Str "long",Space,Str "table",Space,Str "cell",Space,Str "that",Space,Str "will",Space,Str "probably",Space,Str "need",Space,Str "wrapping"]]]
+ ,[[Plain [Str "123"]]
+ ,[Plain [Str "123"]]
+ ,[Plain [Str "123"]]]]]
diff --git a/tests/pipe-tables.txt b/tests/pipe-tables.txt
index a8803724a..a5984b99b 100644
--- a/tests/pipe-tables.txt
+++ b/tests/pipe-tables.txt
@@ -59,3 +59,10 @@ Number of siblings | Salary
------------------:|:------
3 | 33
4 | 44
+
+Long pipe table with relative widths:
+
+| Default1 | Default2 | Default3 |
+ |---------|----------|---------------------------------------|
+|123|this is a table cell|and this is a really long table cell that will probably need wrapping|
+|123|123|123|
diff --git a/tests/s5-basic.html b/tests/s5-basic.html
index ac153d0f1..6fb57e4aa 100644
--- a/tests/s5-basic.html
+++ b/tests/s5-basic.html
@@ -4,7 +4,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
+ <meta name="version" content="S5 1.1" />
<meta name="author" content="Sam Smith" />
+ <meta name="version" content="S5 1.1" />
<meta name="author" content="Jen Jones" />
<meta name="date" content="2006-07-15" />
<title>My S5 Document</title>
@@ -32,9 +34,9 @@
</div>
<div class="presentation">
<div class="titleslide slide">
- <h1>My S5 Document</h1>
- <h2>Sam Smith<br/>Jen Jones</h2>
- <h3>July 15, 2006</h3>
+ <h1 class="title">My S5 Document</h1>
+ <h3 class="author">Sam Smith<br/>Jen Jones</h3>
+ <h4 class="date">July 15, 2006</h4>
</div>
<div id="first-slide" class="slide section level1">
<h1>First slide</h1>
diff --git a/tests/s5-fancy.html b/tests/s5-fancy.html
index 818cca04a..3a2a602be 100644
--- a/tests/s5-fancy.html
+++ b/tests/s5-fancy.html
@@ -4,7 +4,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
+ <meta name="version" content="S5 1.1" />
<meta name="author" content="Sam Smith" />
+ <meta name="version" content="S5 1.1" />
<meta name="author" content="Jen Jones" />
<meta name="date" content="2006-07-15" />
<title>My S5 Document</title>
@@ -233,9 +235,9 @@
</div>
<div class="presentation">
<div class="titleslide slide">
- <h1>My S5 Document</h1>
- <h2>Sam Smith<br/>Jen Jones</h2>
- <h3>July 15, 2006</h3>
+ <h1 class="title">My S5 Document</h1>
+ <h3 class="author">Sam Smith<br/>Jen Jones</h3>
+ <h4 class="date">July 15, 2006</h4>
</div>
<div id="first-slide" class="slide section level1">
<h1>First slide</h1>
diff --git a/tests/tables.html b/tests/tables.html
index a9b2b247d..f5ddf3bcd 100644
--- a/tests/tables.html
+++ b/tests/tables.html
@@ -94,7 +94,7 @@
</tbody>
</table>
<p>Multiline table with caption:</p>
-<table>
+<table style="width:79%;">
<caption>Here's the caption. It may span multiple lines.</caption>
<colgroup>
<col width="15%" />
@@ -126,7 +126,7 @@
</tbody>
</table>
<p>Multiline table without caption:</p>
-<table>
+<table style="width:79%;">
<colgroup>
<col width="15%" />
<col width="13%" />
@@ -180,7 +180,7 @@
</tbody>
</table>
<p>Multiline table without column headers:</p>
-<table>
+<table style="width:79%;">
<colgroup>
<col width="15%" />
<col width="13%" />
diff --git a/tests/textile-reader.native b/tests/textile-reader.native
index de0637f5f..f6a8408c6 100644
--- a/tests/textile-reader.native
+++ b/tests/textile-reader.native
@@ -1,5 +1,5 @@
Pandoc (Meta {unMeta = fromList []})
-[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Space,Str "Textile",Space,Str "Reader.",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
+[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Space,Str "Textile",Space,Str "Reader.",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber's",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
,HorizontalRule
,Header 1 ("headers",[],[]) [Str "Headers"]
,Header 2 ("level-2-with-an-embeded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embeded",Space,Str "link"] ("http://www.example.com","")]
@@ -8,9 +8,9 @@ Pandoc (Meta {unMeta = fromList []})
,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"]
,Header 6 ("level-6",[],[]) [Str "Level",Space,Str "6"]
,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
+,Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
,Para [Str "Line",Space,Str "breaks",Space,Str "are",Space,Str "preserved",Space,Str "in",Space,Str "textile,",Space,Str "so",Space,Str "you",Space,Str "can",Space,Str "not",Space,Str "wrap",Space,Str "your",Space,Str "very",LineBreak,Str "long",Space,Str "paragraph",Space,Str "with",Space,Str "your",Space,Str "favourite",Space,Str "text",Space,Str "editor",Space,Str "and",Space,Str "have",Space,Str "it",Space,Str "rendered",LineBreak,Str "with",Space,Str "no",Space,Str "break."]
-,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet."]
+,Para [Str "Here's",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet."]
,BulletList
[[Plain [Str "criminey."]]]
,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "paragraph",Space,Str "break",Space,Str "between",Space,Str "here"]
@@ -87,9 +87,9 @@ Pandoc (Meta {unMeta = fromList []})
,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str ".",LineBreak,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str ".",LineBreak,Str "Hyphenated-words-are-ok,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "strange_underscore_notation.",LineBreak,Str "A",Space,Link [Strong [Str "strong",Space,Str "link"]] ("http://www.foobar.com",""),Str "."]
,Para [Emph [Strong [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]],LineBreak,Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Space,Str "and",Space,Emph [Strong [Str "that",Space,Str "one"]],Str ".",LineBreak,Strikeout [Str "This",Space,Str "is",Space,Str "strikeout",Space,Str "and",Space,Strong [Str "strong"]]]
,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Space,Superscript [Strong [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str ".",LineBreak,Str "Subscripts:",Space,Subscript [Str "here"],Space,Str "H",Space,Subscript [Str "2"],Str "O,",Space,Str "H",Space,Subscript [Str "23"],Str "O,",Space,Str "H",Space,Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."]
-,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,Str "\8212",Space,Str "automatic",Space,Str "dashes."]
-,Para [Str "Elipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Str "\8230",Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more."]
-,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Quoted DoubleQuote [Str "I\8217d",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you"],Space,Str "for",Space,Str "example."]
+,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,Str "--",Space,Str "automatic",Space,Str "dashes."]
+,Para [Str "Elipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Str "...",Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more."]
+,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Str "\"I'd",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you\"",Space,Str "for",Space,Str "example."]
,Header 1 ("links",[],[]) [Str "Links"]
,Header 2 ("explicit",[],[]) [Str "Explicit"]
,Para [Str "Just",Space,Str "a",Space,Link [Str "url"] ("http://www.url.com","")]
@@ -114,7 +114,7 @@ Pandoc (Meta {unMeta = fromList []})
,[[Plain [Str "bella"]]
,[Plain [Str "45"]]
,[Plain [Str "f"]]]]
-,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Str "\8230"]
+,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Str "..."]
,Header 2 ("with-headers",[],[]) [Str "With",Space,Str "headers"]
,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
[[Plain [Str "name"]]
@@ -152,7 +152,7 @@ Pandoc (Meta {unMeta = fromList []})
,RawBlock (Format "html") "</div>"
,Para [Str "Html",Space,Str "blocks",Space,Str "can",Space,Str "be",Space,RawInline (Format "html") "<div>",Str "inlined",RawInline (Format "html") "</div>",Space,Str "as",Space,Str "well."]
,BulletList
- [[Plain [Str "this",Space,RawInline (Format "html") "<div>",Space,Str "won\8217t",Space,Str "produce",Space,Str "raw",Space,Str "html",Space,Str "blocks",Space,RawInline (Format "html") "</div>"]]
+ [[Plain [Str "this",Space,RawInline (Format "html") "<div>",Space,Str "won't",Space,Str "produce",Space,Str "raw",Space,Str "html",Space,Str "blocks",Space,RawInline (Format "html") "</div>"]]
,[Plain [Str "but",Space,Str "this",Space,RawInline (Format "html") "<strong>",Space,Str "will",Space,Str "produce",Space,Str "inline",Space,Str "html",Space,RawInline (Format "html") "</strong>"]]]
,Para [Str "Can",Space,Str "you",Space,Str "prove",Space,Str "that",Space,Str "2",Space,Str "<",Space,Str "3",Space,Str "?"]
,Header 1 ("acronyms-and-marks",[],[]) [Str "Acronyms",Space,Str "and",Space,Str "marks"]
diff --git a/tests/writer.asciidoc b/tests/writer.asciidoc
index aebc529f0..83869df39 100644
--- a/tests/writer.asciidoc
+++ b/tests/writer.asciidoc
@@ -1,8 +1,7 @@
Pandoc Test Suite
=================
-:author: John MacFarlane
-:author: Anonymous
-:date: July 17, 2006
+John MacFarlane; Anonymous
+July 17, 2006
This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
markdown test suite.