aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-04-03 13:18:40 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2020-04-03 13:25:52 +0200
commitd867cac8caa0171fcd32589a6827a69826c1b087 (patch)
tree7e7d863f578f4c5393e2096427424259bbccd7b4 /test
parent792f1a6b5767dda2e774ec938de50248e1cece27 (diff)
downloadpandoc-d867cac8caa0171fcd32589a6827a69826c1b087.tar.gz
Jira reader: resolve parsing issues of blockquote, color
Parsing problems occurring with block quotes and colored text have been resolved. Fixes: #6233 Fixes: #6235
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Jira.hs18
-rw-r--r--test/Tests/Writers/Jira.hs5
2 files changed, 21 insertions, 2 deletions
diff --git a/test/Tests/Readers/Jira.hs b/test/Tests/Readers/Jira.hs
index 05fc9a3ab..8e37968eb 100644
--- a/test/Tests/Readers/Jira.hs
+++ b/test/Tests/Readers/Jira.hs
@@ -14,8 +14,8 @@ Tests for the RST reader.
-}
module Tests.Readers.Jira (tests) where
-import Prelude
-import Data.Text (Text)
+import Prelude hiding (unlines)
+import Data.Text (Text, unlines)
import Test.Tasty (TestTree, testGroup)
import Tests.Helpers (ToString, purely, test, (=?>))
import Text.Pandoc (def)
@@ -57,6 +57,16 @@ tests =
[ "simple block quote" =:
"bq. _Don't_ quote me on this." =?>
blockQuote (para $ emph "Don't" <> space <> "quote me on this.")
+
+ , "block quote between paragraphs" =:
+ unlines [ "Regular text."
+ , "bq.This is a blockquote"
+ , "More text."
+ ] =?>
+ mconcat [ para "Regular text."
+ , blockQuote (para "This is a blockquote")
+ , para "More text."
+ ]
]
, testGroup "table"
@@ -105,6 +115,10 @@ tests =
"This is {color:red}red{color}." =?>
para ("This is " <> spanWith ("", [], [("color", "red")]) "red" <> ".")
+ , "hexcolor" =:
+ "{color:#00875A}green{color}" =?>
+ para (spanWith ("", [], [("color", "#00875A")]) "green")
+
, "linebreak" =:
"first\nsecond" =?>
para ("first" <> linebreak <> "second")
diff --git a/test/Tests/Writers/Jira.hs b/test/Tests/Writers/Jira.hs
index 063497fd1..48626487e 100644
--- a/test/Tests/Writers/Jira.hs
+++ b/test/Tests/Writers/Jira.hs
@@ -23,5 +23,10 @@ tests =
spanWith ("ignored", ["ignored", "underline"], [("foo", "bar")])
"underlined text" =?>
"+underlined text+"
+
+ , "image with attributes" =:
+ imageWith ("", [], [("align", "right"), ("height", "50")])
+ "image.png" "" mempty =?>
+ "!image.png|align=right, height=50!"
]
]