aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Lua.hs2
-rw-r--r--test/Tests/Readers/Odt.hs1
-rw-r--r--test/command/3523.md31
-rw-r--r--test/command/5619.md10
-rw-r--r--test/command/5620.md9
-rw-r--r--test/command/5627.md83
-rw-r--r--test/command/5635.md23
-rw-r--r--test/command/5642.md8
-rw-r--r--test/odt/markdown/formula.md1
-rw-r--r--test/writer.jats4
-rw-r--r--test/writer.man34
11 files changed, 186 insertions, 20 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index 7a1261eb2..49d54c9c8 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -192,7 +192,7 @@ assertFilterConversion msg filterPath docIn expectedDoc = do
roundtripEqual :: (Eq a, Lua.Peekable a, Lua.Pushable a) => a -> IO Bool
roundtripEqual x = (x ==) <$> roundtripped
where
- roundtripped :: (Lua.Peekable a, Lua.Pushable a) => IO a
+ roundtripped :: Lua.Peekable a => IO a
roundtripped = runLuaTest $ do
oldSize <- Lua.gettop
Lua.push x
diff --git a/test/Tests/Readers/Odt.hs b/test/Tests/Readers/Odt.hs
index c741c71b4..d66a4e98b 100644
--- a/test/Tests/Readers/Odt.hs
+++ b/test/Tests/Readers/Odt.hs
@@ -152,6 +152,7 @@ namesOfTestsComparingToMarkdown = [ "bold"
, "endnote"
, "externalLink"
, "footnote"
+ , "formula"
, "headers"
-- , "horizontalRule"
, "italic"
diff --git a/test/command/3523.md b/test/command/3523.md
new file mode 100644
index 000000000..cb0089489
--- /dev/null
+++ b/test/command/3523.md
@@ -0,0 +1,31 @@
+```
+% pandoc -f latex -t html
+\documentclass{article}
+\usepackage{epigraph}
+\begin{document}
+
+\epigraph{
+ Das Recht hat kein Dasein f{\"u}r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen.
+
+ Das Recht hat kein Dasein f{\"u}r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen.
+
+ \begin{itemize}
+ \item hey
+ \item hey
+ \item hey
+ \end{itemize}
+
+ }{ Friedrich Carl von Savigny }
+\end{document}
+^D
+<div class="epigraph">
+<p>Das Recht hat kein Dasein f<span>ü</span>r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen.</p>
+<p>Das Recht hat kein Dasein f<span>ü</span>r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen.</p>
+<ul>
+<li><p>hey</p></li>
+<li><p>hey</p></li>
+<li><p>hey</p></li>
+</ul>
+<p>Friedrich Carl von Savigny</p>
+</div>
+```
diff --git a/test/command/5619.md b/test/command/5619.md
new file mode 100644
index 000000000..776d57acc
--- /dev/null
+++ b/test/command/5619.md
@@ -0,0 +1,10 @@
+```
+% pandoc -f rst -t native
+.. figure:: img1.jpg
+ :width: 1in
+ :name: test
+
+ The caption. Here's what piggybacking on caption would look like {#fig:1}
+^D
+[Para [Image ("test",[],[("width","1in")]) [Str "The",Space,Str "caption.",Space,Str "Here's",Space,Str "what",Space,Str "piggybacking",Space,Str "on",Space,Str "caption",Space,Str "would",Space,Str "look",Space,Str "like",Space,Str "{#fig:1}"] ("img1.jpg","fig:")]]
+```
diff --git a/test/command/5620.md b/test/command/5620.md
new file mode 100644
index 000000000..c48fefce1
--- /dev/null
+++ b/test/command/5620.md
@@ -0,0 +1,9 @@
+```
+% pandoc -t man
+`-o`, `--output=`*OUTFILE*
+: Write output to *OUTFILE* instead of `stdout`(3)
+^D
+.TP
+\f[B]\f[CB]-o\f[B]\f[R], \f[B]\f[CB]--output=\f[B]\f[R]\f[I]OUTFILE\f[R]
+Write output to \f[I]OUTFILE\f[R] instead of \f[C]stdout\f[R](3)
+```
diff --git a/test/command/5627.md b/test/command/5627.md
new file mode 100644
index 000000000..0f67a083f
--- /dev/null
+++ b/test/command/5627.md
@@ -0,0 +1,83 @@
+```
+% pandoc -t html
+## Example
+
+1. One
+2. Two `-->something<!--`
+3. Three
+
+~~~html
+--><!--<script>alert('Escaped!')</script>
+~~~
+
+~~~html
+Something
+~~~
+^D
+<h2 id="example">Example</h2>
+<ol type="1">
+<li>One</li>
+<li>Two <code>--&gt;something&lt;!--</code></li>
+<li>Three</li>
+</ol>
+<div class="sourceCode" id="cb1"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb1-1"><a href="#cb1-1"></a>--&gt;<span class="co">&lt;!--&lt;script&gt;alert(&#39;Escaped!&#39;)&lt;/script&gt;</span></span></code></pre></div>
+<div class="sourceCode" id="cb2"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1"></a>Something</span></code></pre></div>
+```
+
+```
+% pandoc -t html
+## Example 2
+
+- `-->something<!--`
+- `-->something<!--`
+- bye `-->something else<!--`
+
+~~~html
+--><!--<script>alert('Escaped!')</script>
+~~~
+
+~~~html
+Something
+~~~
+^D
+<h2 id="example-2">Example 2</h2>
+<ul>
+<li><code>--&gt;something&lt;!--</code></li>
+<li><code>--&gt;something&lt;!--</code></li>
+<li>bye <code>--&gt;something else&lt;!--</code></li>
+</ul>
+<div class="sourceCode" id="cb1"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb1-1"><a href="#cb1-1"></a>--&gt;<span class="co">&lt;!--&lt;script&gt;alert(&#39;Escaped!&#39;)&lt;/script&gt;</span></span></code></pre></div>
+<div class="sourceCode" id="cb2"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1"></a>Something</span></code></pre></div>
+```
+
+```
+% pandoc -t html
+## Example 3
+
+1. `-->one<!--`
+5. bye `-->two <!--`
+3. ` three, not in block
+1. four, not in block `
+2. five
+5. six
+6. seven `
+- separate unordered list `
+42. forty-two, separate ordered list
+^D
+<h2 id="example-3">Example 3</h2>
+<ol type="1">
+<li><code>--&gt;one&lt;!--</code></li>
+<li>bye <code>--&gt;two &lt;!--</code></li>
+<li>` three, not in block</li>
+<li>four, not in block `</li>
+<li>five</li>
+<li>six</li>
+<li>seven `</li>
+</ol>
+<ul>
+<li>separate unordered list `</li>
+</ul>
+<ol start="42" type="1">
+<li>forty-two, separate ordered list</li>
+</ol>
+```
diff --git a/test/command/5635.md b/test/command/5635.md
new file mode 100644
index 000000000..72440616f
--- /dev/null
+++ b/test/command/5635.md
@@ -0,0 +1,23 @@
+```
+% pandoc -f latex -t plain
+\providecommand{\test}{foo}
+\providecommand{\test}{bar}
+
+The value is: \test
+^D
+The value is: foo
+```
+
+```
+% pandoc -f latex -t plain
+\provideenvironment{test}{startfoo}{stopfoo}
+\provideenvironment{test}{startbar}{stopbar}
+
+\begin{test}
+Hi
+\end{test}
+^D
+startfoo Hi stopfoo
+```
+
+
diff --git a/test/command/5642.md b/test/command/5642.md
new file mode 100644
index 000000000..7fe8f5a5f
--- /dev/null
+++ b/test/command/5642.md
@@ -0,0 +1,8 @@
+```
+% pandoc -t html5 -f markdown
+![test](foo){aria-describedby="barbaz"}
+^D
+<figure>
+<img src="foo" aria-describedby="barbaz" alt="" /><figcaption>test</figcaption>
+</figure>
+```
diff --git a/test/odt/markdown/formula.md b/test/odt/markdown/formula.md
new file mode 100644
index 000000000..3cf39ae66
--- /dev/null
+++ b/test/odt/markdown/formula.md
@@ -0,0 +1 @@
+$$E = {m \cdot c^{2}}$$ \ No newline at end of file
diff --git a/test/writer.jats b/test/writer.jats
index 7bbf8304d..8df981cc3 100644
--- a/test/writer.jats
+++ b/test/writer.jats
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.0 20120330//EN"
+<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN"
"JATS-journalpublishing1.dtd">
-<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.0" article-type="other">
+<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.1" article-type="other">
<front>
<journal-meta>
<journal-title-group>
diff --git a/test/writer.man b/test/writer.man
index 413512c73..ebae6b78f 100644
--- a/test/writer.man
+++ b/test/writer.man
@@ -318,47 +318,47 @@ Williams
.PP
Tight using spaces:
.TP
-.B apple
+apple
red fruit
.TP
-.B orange
+orange
orange fruit
.TP
-.B banana
+banana
yellow fruit
.PP
Tight using tabs:
.TP
-.B apple
+apple
red fruit
.TP
-.B orange
+orange
orange fruit
.TP
-.B banana
+banana
yellow fruit
.PP
Loose:
.TP
-.B apple
+apple
red fruit
.TP
-.B orange
+orange
orange fruit
.TP
-.B banana
+banana
yellow fruit
.PP
Multiple blocks with italics:
.TP
-.B \f[I]apple\f[R]
+\f[I]apple\f[R]
red fruit
.RS
.PP
contains seeds, crisp, pleasant to taste
.RE
.TP
-.B \f[I]orange\f[R]
+\f[I]orange\f[R]
orange fruit
.RS
.IP
@@ -375,31 +375,31 @@ orange block quote
.PP
Multiple definitions, tight:
.TP
-.B apple
+apple
red fruit
computer
.TP
-.B orange
+orange
orange fruit
bank
.PP
Multiple definitions, loose:
.TP
-.B apple
+apple
red fruit
computer
.TP
-.B orange
+orange
orange fruit
bank
.PP
Blank line after term, indented marker, alternate markers:
.TP
-.B apple
+apple
red fruit
computer
.TP
-.B orange
+orange
orange fruit
.RS
.IP "1." 3