aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
Diffstat (limited to 'test/command')
-rw-r--r--test/command/3422.md9
-rw-r--r--test/command/3432a.md19
-rw-r--r--test/command/512.md41
-rw-r--r--test/command/latex-tabular-column-specs.md24
-rw-r--r--test/command/parse-raw.md27
-rw-r--r--test/command/smart.md45
6 files changed, 165 insertions, 0 deletions
diff --git a/test/command/3422.md b/test/command/3422.md
new file mode 100644
index 000000000..a010320e9
--- /dev/null
+++ b/test/command/3422.md
@@ -0,0 +1,9 @@
+See #3422
+
+```
+% pandoc -t latex --listings
+`int main(int argc, const char *argv[]);`{.c}
+^D
+\lstinline[language=C]!int main(int argc, const char *argv[]);!
+```
+
diff --git a/test/command/3432a.md b/test/command/3432a.md
new file mode 100644
index 000000000..5f25bce60
--- /dev/null
+++ b/test/command/3432a.md
@@ -0,0 +1,19 @@
+```
+% pandoc -f rst
+* - a
+ - b
+* - c
+ - d
+^D
+<ul>
+<li><ul>
+<li>a</li>
+<li>b</li>
+</ul></li>
+<li><ul>
+<li>c</li>
+<li>d</li>
+</ul></li>
+</ul>
+```
+
diff --git a/test/command/512.md b/test/command/512.md
new file mode 100644
index 000000000..a13c434f6
--- /dev/null
+++ b/test/command/512.md
@@ -0,0 +1,41 @@
+```
+% pandoc -f rst
+`click here`__ or `click here`__
+
+.. _link1: http://www.example.com/
+.. _link2: http://johnmacfarlane.net/pandoc/
+
+__ link1_
+__ link2_
+^D
+<p><a href="http://www.example.com/">click here</a> or <a href="http://johnmacfarlane.net/pandoc/">click here</a></p>
+```
+
+Multiple indirection:
+
+```
+% pandoc -f rst
+`click here`__
+
+.. _link1: link2_
+.. _link2: http://johnmacfarlane.net/pandoc/
+
+__ link1_
+^D
+<p><a href="http://johnmacfarlane.net/pandoc/">click here</a></p>
+```
+
+Loop detection:
+
+```
+% pandoc -f rst
+`click here`__
+
+.. _link1: link2_
+.. _link2: link1_
+
+__ link1_
+^D
+<p><a href="">click here</a></p>
+```
+
diff --git a/test/command/latex-tabular-column-specs.md b/test/command/latex-tabular-column-specs.md
new file mode 100644
index 000000000..ed44a9980
--- /dev/null
+++ b/test/command/latex-tabular-column-specs.md
@@ -0,0 +1,24 @@
+See https://groups.google.com/forum/#!topic/pandoc-discuss/_VXtqihCyDU.
+
+```
+% pandoc -f latex -t native
+\begin{tabular}{>{$}l<{$}>{$}l<{$} >{$}l<{$}}
+\toprule
+& f1 & f2 \\
+\midrule
+e & 0.5 & 4 \\
+f & 0.5 & 5,5 \\
+\bottomrule
+\end{tabular}
+^D
+[Table [] [AlignLeft,AlignLeft,AlignLeft] [0.0,0.0,0.0]
+ [[Plain [Math InlineMath ""]]
+ ,[Plain [Math InlineMath "f1"]]
+ ,[Plain [Math InlineMath "f2"]]]
+ [[[Plain [Math InlineMath "e"]]
+ ,[Plain [Math InlineMath "0.5"]]
+ ,[Plain [Math InlineMath "4"]]]
+ ,[[Plain [Math InlineMath "f"]]
+ ,[Plain [Math InlineMath "0.5"]]
+ ,[Plain [Math InlineMath "5,5"]]]]]
+```
diff --git a/test/command/parse-raw.md b/test/command/parse-raw.md
new file mode 100644
index 000000000..f4e493c69
--- /dev/null
+++ b/test/command/parse-raw.md
@@ -0,0 +1,27 @@
+```
+% pandoc -f latex+raw_tex -t markdown
+\emph{Hi \foo{there}}
+^D
+*Hi \foo{there}*
+```
+
+```
+% pandoc -f latex -t markdown
+\emph{Hi \foo{there}}
+^D
+*Hi*
+```
+
+```
+% pandoc -f html+raw_html -t markdown
+<em>Hi <blink>there</blink></em>
+^D
+*Hi <blink>there</blink>*
+```
+
+```
+% pandoc -f html -t markdown
+<em>Hi <blink>there</blink></em>
+^D
+*Hi there*
+```
diff --git a/test/command/smart.md b/test/command/smart.md
new file mode 100644
index 000000000..e64d67de2
--- /dev/null
+++ b/test/command/smart.md
@@ -0,0 +1,45 @@
+```
+% pandoc -f markdown+smart -t markdown-smart
+"hi"...dog's breath---cat 5--6
+^D
+“hi”…dog’s breath—cat 5–6
+```
+
+```
+% pandoc -f markdown+smart -t markdown+smart
+"hi"...dog's breath---cat 5--6
+^D
+"hi"...dog's breath---cat 5--6
+```
+
+When we render literal quotes without smart, we need to escape:
+
+```
+% pandoc -f markdown-smart \
+ -t markdown+smart
+"hi"...dog's breath---cat 5--6
+^D
+\"hi\"\...dog\'s breath\-\--cat 5\--6
+```
+
+```
+% pandoc -f markdown+smart -t rst-smart
+"hi"...dog's breath---cat 5--6
+^D
+“hi”…dog’s breath—cat 5–6
+```
+
+```
+% pandoc -f markdown+smart -t rst+smart
+"hi"...dog's breath---cat 5--6
+^D
+"hi"...dog's breath---cat 5--6
+```
+
+```
+% pandoc -f markdown-smart -t rst+smart
+"hi"...dog's breath---cat 5--6
+^D
+\"hi\"\...dog\'s breath\-\--cat 5\--6
+```
+