aboutsummaryrefslogtreecommitdiff
path: root/haddock-library/test
diff options
context:
space:
mode:
authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-06-03 02:11:31 +0200
committerŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-06-03 02:11:31 +0200
commit3536512c4658a51b72a9b879f372fa08ed402d9c (patch)
tree923be1e8ac2e3f333b7e678e4b6ee6df34a1beec /haddock-library/test
parentc4a73b5b0fb7574bd519584c16b5be0675f3f430 (diff)
Add arbitrary-indent spec test for parser.
Diffstat (limited to 'haddock-library/test')
-rw-r--r--haddock-library/test/Documentation/Haddock/ParserSpec.hs17
1 files changed, 17 insertions, 0 deletions
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"