aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-09-10 22:35:52 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2017-09-11 18:17:28 +0300
commit508c3a64d823989dc6613ac7656851989530af65 (patch)
tree8f4d488d8b85b85fc8ae94f5f966f757b0ca5bfa /test/Tests
parent7df095f049d8499972af966d4622d20b5a465900 (diff)
downloadpandoc-508c3a64d823989dc6613ac7656851989530af65.tar.gz
Muse reader: parse {{{ }}} example syntax
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Readers/Muse.hs33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 66c6ea7f2..6e3760222 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -232,6 +232,39 @@ tests =
lineBlock [ "Foo bar" ] <>
lineBlock [ "Foo bar" ] <>
lineBlock [ "\160\160\160Foo" ]
+ , testGroup "Example"
+ [ "Braces on separate lines" =:
+ T.unlines [ "{{{"
+ , "Example line"
+ , "}}}"
+ ] =?>
+ codeBlock "Example line"
+ , "Spaces after opening braces" =:
+ T.unlines [ "{{{ "
+ , "Example line"
+ , "}}}"
+ ] =?>
+ codeBlock "Example line"
+ , "One blank line in the beginning" =:
+ T.unlines [ "{{{"
+ , ""
+ , "Example line"
+ , "}}}"
+ ] =?>
+ codeBlock "\nExample line"
+ , "One blank line in the end" =:
+ T.unlines [ "{{{"
+ , "Example line"
+ , ""
+ , "}}}"
+ ] =?>
+ codeBlock "Example line\n"
+ -- Amusewiki requires braces to be on separate line,
+ -- this is an extension.
+ , "One line" =:
+ "{{{Example line}}}" =?>
+ codeBlock "Example line"
+ ]
, testGroup "Example tag"
[ "Tags on separate lines" =:
T.unlines [ "<example>"