X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=test%2FWikiParserTest.hs;h=543401597cbc5b85ce733d7db72b9a2f94369188;hb=478a7dc233df921885184b06653735fdaf452305;hp=7e18741b11761c01013f6fa0ba8687572889fd16;hpb=16b140fe235a43f9dfb9b57e69ebc302beeaea27;p=Rakka.git diff --git a/test/WikiParserTest.hs b/test/WikiParserTest.hs index 7e18741..5434015 100644 --- a/test/WikiParserTest.hs +++ b/test/WikiParserTest.hs @@ -215,4 +215,28 @@ testData = [ (parseWiki "" (Right [ List (ListElement Bullet [ [Right (Text "a")] ]) , List (ListElement Numbered [ [Right (Text "b")] ]) ])) + + , (parseWiki "foo:bar" + ~?= + (Right [ Paragraph [ Text "foo" + , Text ":bar" + ] + ])) + + , (parseWiki "; foo: bar" + ~?= + (Right [ DefinitionList [Definition [Text "foo"] [Text "bar"]] ])) + + , (parseWiki "; foo: bar\n" + ~?= + (Right [ DefinitionList [Definition [Text "foo"] [Text "bar"]] ])) + + , (parseWiki "; foo\n: bar\n; bar\n: baz\n: baz" + ~?= + (Right [ DefinitionList [ Definition [Text "foo"] [ Text "bar" ] + , Definition [Text "bar"] [ Text "baz" + , Text "\n" + , Text "baz" ] + ] + ])) ]