From c1617565fc2a5984e2e44d4da9adf7f8a26b3160 Mon Sep 17 00:00:00 2001 From: Yan Pas Date: Wed, 9 May 2018 03:24:45 +0300 Subject: basic manfile parsing --- test/Tests/Readers/Man.hs | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'test/Tests/Readers') diff --git a/test/Tests/Readers/Man.hs b/test/Tests/Readers/Man.hs index 5dc91544b..007935be1 100644 --- a/test/Tests/Readers/Man.hs +++ b/test/Tests/Readers/Man.hs @@ -2,15 +2,30 @@ module Tests.Readers.Man (tests) where import Data.Text (Text) -import qualified Data.Text as T import Test.Tasty import Tests.Helpers import Text.Pandoc import Text.Pandoc.Arbitrary () import Text.Pandoc.Builder +import Text.Pandoc.Readers.Man -creole :: Text -> Pandoc -creole = purely $ readCreole def{ readerStandalone = True } +man :: Text -> Pandoc +man = purely $ readMan def + +infix 4 =: +(=:) :: ToString c + => String -> (Text, c) -> TestTree +(=:) = test man tests :: [TestTree] -tests = [] \ No newline at end of file +tests = [ + -- .SH "HEllo bbb" "aaa"" as" + testGroup "Macros" [ + "Bold" =: + ".B foo\n" + =?> strong "foo" + , "Italic" =: + ".I foo\n" + =?> emph "foo" + ] + ] -- cgit v1.2.3