git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: add test for #disable-tables directive in Emacs mode
6fd3cdaAlexander Krotov
test/Tests/Readers/Muse.hs+13−7
@@ -454,6 +454,19 @@ tests =
454 ] =?>
454 ] =?>
455 blockQuote (para "* Hi")
455 blockQuote (para "* Hi")
456 ]
456 ]
457+ , testGroup "Directives"
458+ [ "Title" =:
459+ "#title Document title" =?>
460+ let titleInline = toList $ "Document title"
461+ meta = setMeta "title" (MetaInlines titleInline) $ nullMeta
462+ in Pandoc meta mempty
463+ -- Emacs Muse documentation says that "You can use any combination
464+ -- of uppercase and lowercase letters for directives",
465+ -- but also allows '-', which is not documented, but used for disable-tables.
466+ , test emacsMuse "Disable tables"
467+ ("#disable-tables t" =?>
468+ Pandoc (setMeta "disable-tables" (MetaInlines $ toList "t") $ nullMeta) mempty)
469+ ]
457 , testGroup "Anchors"
470 , testGroup "Anchors"
458 [ "Anchor" =:
471 [ "Anchor" =:
459 T.unlines [ "; A comment to make sure anchor is not parsed as a directive"
472 T.unlines [ "; A comment to make sure anchor is not parsed as a directive"
@@ -940,11 +953,4 @@ tests =
940 , para "Third"
953 , para "Third"
941 ])
954 ])
942 ]
955 ]
943− , testGroup "Meta"
944− [ "Title" =:
945− "#title Document title" =?>
946− let titleInline = toList $ "Document title"
947− meta = setMeta "title" (MetaInlines titleInline) $ nullMeta
948− in Pandoc meta mempty
949− ]
950 ]
956 ]