aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-01-19 14:58:15 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-01-19 15:00:00 +0300
commit01499b766b16f4ab1c7ce4e3e82780a099c6dd37 (patch)
treeb2c67fdbc586b16de9898c059305c72ef004ce3f /test
parent7680e9b9642c1bade4152e4c833003688c439ca1 (diff)
downloadpandoc-01499b766b16f4ab1c7ce4e3e82780a099c6dd37.tar.gz
Muse writer: support definitions with multiple descriptions
Muse reader does not support this syntax yet, but Emacs Muse parses it correctly.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Writers/Muse.hs13
-rw-r--r--test/writer.muse13
2 files changed, 16 insertions, 10 deletions
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index e2e6ba06c..158f80f67 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -94,6 +94,15 @@ tests = [ testGroup "block elements"
, " second definition :: second description"
, " third definition :: third description"
]
+ , "definition list with multiple descriptions" =:
+ definitionList [ (text "first definition", [plain $ text "first description"
+ ,plain $ text "second description"])
+ , (text "second definition", [plain $ text "third description"])
+ ]
+ =?> unlines [ " first definition :: first description"
+ , " :: second description"
+ , " second definition :: third description"
+ ]
]
-- Test that lists of the same type and style are separated with two blanklines
, testGroup "sequential lists"
@@ -197,8 +206,8 @@ tests = [ testGroup "block elements"
]
, "nested definition lists" =: definitionList [ (text "first definition", [plain $ text "first description"])
, (text "second definition",
- [ plain (text "second description")
- , definitionList [ ( text "first inner definition"
+ [ plain (text "second description") <>
+ definitionList [ ( text "first inner definition"
, [plain $ text "first inner description"])
, ( text "second inner definition"
, [plain $ text "second inner description"])
diff --git a/test/writer.muse b/test/writer.muse
index db34a2733..33c622a3a 100644
--- a/test/writer.muse
+++ b/test/writer.muse
@@ -287,24 +287,21 @@ Multiple blocks with italics:
Multiple definitions, tight:
apple :: red fruit
- computer
+ :: computer
orange :: orange fruit
- bank
+ :: bank
Multiple definitions, loose:
apple :: red fruit
-
- computer
+ :: computer
orange :: orange fruit
-
- bank
+ :: bank
Blank line after term, indented marker, alternate markers:
apple :: red fruit
-
- computer
+ :: computer
orange :: orange fruit
1. sublist