summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2016-11-19 01:17:04 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2016-11-19 01:17:04 +0100
commit1a8af5fc442287ef2f7775c4de179e4520487a4f (patch)
tree245e411f22c70ceb5e4076efb021fb16cf886510 /tests
parentf9df62c29fc88634f1d4f264f894265096b0985f (diff)
Org reader: Ensure images in paragraphs are not parsed as figures
This fixes a regression introduced in 7e5220b57c5a48fabe6e43ba270db812593d3463.
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Org.hs34
1 files changed, 22 insertions, 12 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 882701644..6b07784b7 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -188,19 +188,29 @@ tests =
"=is_subst = True=" =?>
para (code "is_subst = True")
- , "Image" =:
- "[[./sunset.jpg]]" =?>
- (para $ image "./sunset.jpg" "" "")
-
- , "Image with explicit file: prefix" =:
- "[[file:sunrise.jpg]]" =?>
- (para $ image "sunrise.jpg" "" "")
+ , testGroup "Images"
+ [ "Image" =:
+ "[[./sunset.jpg]]" =?>
+ (para $ image "./sunset.jpg" "" "")
+
+ , "Image with explicit file: prefix" =:
+ "[[file:sunrise.jpg]]" =?>
+ (para $ image "sunrise.jpg" "" "")
+
+ , "Multiple images within a paragraph" =:
+ unlines [ "[[file:sunrise.jpg]]"
+ , "[[file:sunset.jpg]]"
+ ] =?>
+ (para $ (image "sunrise.jpg" "" "")
+ <> softbreak
+ <> (image "sunset.jpg" "" ""))
- , "Image with html attributes" =:
- unlines [ "#+ATTR_HTML: :width 50%"
- , "[[file:guinea-pig.gif]]"
- ] =?>
- (para $ imageWith ("", [], [("width", "50%")]) "guinea-pig.gif" "" "")
+ , "Image with html attributes" =:
+ unlines [ "#+ATTR_HTML: :width 50%"
+ , "[[file:guinea-pig.gif]]"
+ ] =?>
+ (para $ imageWith ("", [], [("width", "50%")]) "guinea-pig.gif" "" "")
+ ]
, "Explicit link" =:
"[[http://zeitlens.com/][pseudo-random /nonsense/]]" =?>