aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Org.hs25
-rw-r--r--tests/writer.org2
2 files changed, 26 insertions, 1 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 49130f0ab..f39bd7992 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -94,6 +94,10 @@ tests =
"a_{n+1}" =?>
para (str "a" <> subscript "n+1")
+ , "Linebreak" =:
+ "line \\\\ \nbreak" =?>
+ para ("line" <> linebreak <> "break")
+
, "Markup-chars not occuring on word break are symbols" =:
unlines [ "this+that+ +so+on"
, "seven*eight* nine*"
@@ -377,6 +381,27 @@ tests =
code' = "main = putStrLn greeting\n" ++
" where greeting = \"moin\"\n"
in codeBlockWith attr' code'
+
+ , "Figure" =:
+ unlines [ "#+caption: A very courageous man."
+ , "#+name: goodguy"
+ , "[[edward.jpg]]"
+ ] =?>
+ para (image "edward.jpg" "fig:goodguy" "A very courageous man.")
+
+ , "Unnamed figure" =:
+ unlines [ "#+caption: A great whistleblower."
+ , "[[snowden.png]]"
+ ] =?>
+ para (image "snowden.png" "" "A great whistleblower.")
+
+ , "Figure with `fig:` prefix in name" =:
+ unlines [ "#+caption: Used as a metapher in evolutionary biology."
+ , "#+name: fig:redqueen"
+ , "[[the-red-queen.jpg]]"
+ ] =?>
+ para (image "the-red-queen.jpg" "fig:redqueen"
+ "Used as a metapher in evolutionary biology.")
]
, testGroup "Lists" $
diff --git a/tests/writer.org b/tests/writer.org
index 85016f352..524d49305 100644
--- a/tests/writer.org
+++ b/tests/writer.org
@@ -42,7 +42,7 @@ item.
Here's one with a bullet. * criminey.
-There should be a hard line break
+There should be a hard line break\\
here.
--------------