summaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorAlexander <ilabdsf@gmail.com>2017-08-07 07:43:59 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-06 21:43:59 -0700
commit1b5bfced558d28d45caadc6171f9e7448f3deae1 (patch)
treed84c7fd7e1b0f6012d1bbc61225ee57b972a6353 /test/Tests/Readers
parenta67a96b932344f5677be2fb810fb788a1988bd0b (diff)
Muse reader: debug indented paragraph support (#3839)
Take only first line indentation into account and do not start new paragraph on indentation change.
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Muse.hs35
1 files changed, 29 insertions, 6 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 33fe2aeb3..c5c973f00 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -32,7 +32,7 @@ tests =
[ testGroup "Inlines"
[ "Plain String" =:
"Hello, World" =?>
- para (spcSep [ "Hello,", "World" ])
+ para "Hello, World"
, "Emphasis" =: "*Foo bar*" =?> para (emph . spcSep $ ["Foo", "bar"])
@@ -102,12 +102,35 @@ tests =
, "5 dashes is a horizontal rule" =: "-----" =?> horizontalRule
, "4 dashes with spaces is a horizontal rule" =: "---- " =?> horizontalRule
]
+ , testGroup "Paragraphs"
+ [ "Simple paragraph" =:
+ T.unlines [ "First line"
+ , "second line."
+ ] =?>
+ para "First line second line."
+ , "Indented paragraph" =:
+ T.unlines [ " First line"
+ , "second line."
+ ] =?>
+ para "First line second line."
+ -- Emacs Muse starts a blockquote on the second line.
+ -- We copy Amusewiki behavior and require a blank line to start a blockquote.
+ , "Indentation in the middle of paragraph" =:
+ T.unlines [ "First line"
+ , " second line"
+ , "third line"
+ ] =?>
+ para "First line second line third line"
+ , "Quote" =:
+ " This is a quotation\n" =?>
+ blockQuote (para "This is a quotation")
+ , "Multiline quote" =:
+ T.unlines [ " This is a quotation"
+ , " with a continuation"
+ ] =?>
+ blockQuote (para "This is a quotation with a continuation")
+ ]
, "Quote tag" =: "<quote>Hello, world</quote>" =?> blockQuote (para $ text "Hello, world")
- , "Quote" =: " This is a quotation\n" =?> blockQuote (para $ text "This is a quotation")
- , "Multiline quote" =: T.unlines [ " This is a quotation"
- , " with a continuation"
- ]
- =?> blockQuote (para $ text "This is a quotation with a continuation")
, "Center" =: "<center>Hello, world</center>" =?> para (text "Hello, world")
, "Right" =: "<right>Hello, world</right>" =?> para (text "Hello, world")
, testGroup "Comments"