Muse reader: test metadata parsing

This commit is contained in:
Alexander Krotov
2017-09-26 19:31:10 +03:00
parent 3fb3af7579
commit 2cdb8fe2e6
2 changed files with 8 additions and 2 deletions
+1 -2
View File
@@ -150,8 +150,7 @@ parseDirective = do
key <- many letter
space
spaces
raw <- many $ noneOf "\n"
newline
raw <- manyTill anyChar eol
value <- parseFromString (trimInlinesF . mconcat <$> many inline) raw
return (key, value)
+7
View File
@@ -689,4 +689,11 @@ tests =
, para "Third"
])
]
, testGroup "Meta"
[ "Title" =:
"#title Document title" =?>
let titleInline = toList $ "Document title"
meta = setMeta "title" (MetaInlines titleInline) $ nullMeta
in Pandoc meta mempty
]
]