From 3536512c4658a51b72a9b879f372fa08ed402d9c Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Wed, 3 Jun 2015 02:11:31 +0200 Subject: Add arbitrary-indent spec test for parser. --- .../test/Documentation/Haddock/ParserSpec.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'haddock-library/test') diff --git a/haddock-library/test/Documentation/Haddock/ParserSpec.hs b/haddock-library/test/Documentation/Haddock/ParserSpec.hs index 9161160d..2ef414fb 100644 --- a/haddock-library/test/Documentation/Haddock/ParserSpec.hs +++ b/haddock-library/test/Documentation/Haddock/ParserSpec.hs @@ -696,6 +696,23 @@ spec = do ] <> DocOrderedList [ DocParagraph "baz" ] + it "allows arbitrary initial indent of a list" $ do + unlines + [ " * foo" + , " * bar" + , "" + , " * quux" + , "" + , " * baz" + ] + `shouldParseTo` + DocUnorderedList + [ DocParagraph "foo" + , DocParagraph "bar" + <> DocUnorderedList [ DocParagraph "quux" ] + , DocParagraph "baz" + ] + it "definition lists can come back to top level with a different list" $ do "[foo]: foov\n\n [bar]: barv\n\n1. baz" `shouldParseTo` DocDefList [ ("foo", "foov" -- cgit v1.2.3