aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/Org/Inline.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Tests/Readers/Org/Inline.hs')
-rw-r--r--test/Tests/Readers/Org/Inline.hs34
1 files changed, 21 insertions, 13 deletions
diff --git a/test/Tests/Readers/Org/Inline.hs b/test/Tests/Readers/Org/Inline.hs
index 9cfcda79f..e5996d4d8 100644
--- a/test/Tests/Readers/Org/Inline.hs
+++ b/test/Tests/Readers/Org/Inline.hs
@@ -184,26 +184,26 @@ tests =
, testGroup "Images"
[ "Image" =:
- "[[./sunset.jpg]]" =?>
- para (image "./sunset.jpg" "" "")
+ "[[./sunset.jpg]]" =?>
+ para (image "./sunset.jpg" "" "")
, "Image with explicit file: prefix" =:
- "[[file:sunrise.jpg]]" =?>
- para (image "sunrise.jpg" "" "")
+ "[[file:sunrise.jpg]]" =?>
+ para (image "sunrise.jpg" "" "")
, "Multiple images within a paragraph" =:
- T.unlines [ "[[file:sunrise.jpg]]"
- , "[[file:sunset.jpg]]"
- ] =?>
- para ((image "sunrise.jpg" "" "")
+ T.unlines [ "[[file:sunrise.jpg]]"
+ , "[[file:sunset.jpg]]"
+ ] =?>
+ para (image "sunrise.jpg" "" ""
<> softbreak
- <> (image "sunset.jpg" "" ""))
+ <> image "sunset.jpg" "" "")
, "Image with html attributes" =:
- T.unlines [ "#+ATTR_HTML: :width 50%"
- , "[[file:guinea-pig.gif]]"
- ] =?>
- para (imageWith ("", [], [("width", "50%")]) "guinea-pig.gif" "" "")
+ T.unlines [ "#+ATTR_HTML: :width 50%"
+ , "[[file:guinea-pig.gif]]"
+ ] =?>
+ para (imageWith ("", [], [("width", "50%")]) "guinea-pig.gif" "" "")
]
, "Explicit link" =:
@@ -215,6 +215,10 @@ tests =
"[[http://zeitlens.com/]]" =?>
para (link "http://zeitlens.com/" "" "http://zeitlens.com/")
+ , "Internal self-link (reference)" =:
+ "[[#rabbit]]" =?>
+ para (link "#rabbit" "" "#rabbit")
+
, "Absolute file link" =:
"[[/url][hi]]" =?>
para (link "file:///url" "" "hi")
@@ -235,6 +239,10 @@ tests =
"[[http://example.com][./logo.png]]" =?>
para (link "http://example.com" "" (image "./logo.png" "" ""))
+ , "Link to image" =:
+ "[[https://example.com/image.jpg][Look!]]" =?>
+ para (link "https://example.com/image.jpg" "" (str "Look!"))
+
, "Plain link" =:
"Posts on http://zeitlens.com/ can be funny at times." =?>
para (spcSep [ "Posts", "on"