aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Muse.hs3
-rw-r--r--test/Tests/Writers/Muse.hs7
2 files changed, 10 insertions, 0 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 426ba935d..87495eba1 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -236,6 +236,9 @@ tests =
, "Class tag" =: "<class name=\"foo\">bar</class>" =?> para (spanWith ("", ["foo"], []) "bar")
, "Class tag without name" =: "<class>foobar</class>" =?> para (spanWith ("", [], []) "foobar")
+ , "RTL" =: "<<<foo bar>>>" =?> para (spanWith ("", [], [("dir", "rtl")]) "foo bar")
+ , "LTR" =: ">>>foo bar<<<" =?> para (spanWith ("", [], [("dir", "ltr")]) "foo bar")
+
-- <em> tag should match with the last </em> tag, not verbatim one
, "Nested \"</em>\" inside em tag" =: "<em>foo<verbatim></em></verbatim>bar</em>" =?> para (emph "foo</em>bar")
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index 7a07f39b7..ee61d18e0 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -620,6 +620,13 @@ tests = [ testGroup "block elements"
, "adjacent spans" =: spanWith ("", ["syllable"], []) (str "wa") <>
spanWith ("", ["syllable"], []) (str "ter")
=?> "<class name=\"syllable\">wa</class><class name=\"syllable\">ter</class>"
+ , testGroup "RTL"
+ [ "RTL span" =: spanWith ("",[],[("dir", "rtl")]) (text "foo bar") =?> "<<<foo bar>>>"
+ , "LTR span" =: spanWith ("",[],[("dir", "ltr")]) (text "foo bar") =?> ">>>foo bar<<<"
+ , "RTL span with a class" =: spanWith ("",["foobar"],[("dir", "rtl")]) (text "foo bar") =?> "<class name=\"foobar\"><<<foo bar>>></class>"
+ , "LTR span with a class" =: spanWith ("",["foobar"],[("dir", "ltr")]) (text "foo bar") =?> "<class name=\"foobar\">>>>foo bar<<<</class>"
+ , "Escape <<< and >>>" =: plain (text "<<< foo bar >>>") =?> "<verbatim><<<</verbatim> foo bar <verbatim>>>></verbatim>"
+ ]
, testGroup "combined"
[ "emph word before" =:
para ("foo" <> emph "bar") =?>