aboutsummaryrefslogtreecommitdiff
path: root/haddock-library/test/Documentation
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-03-26 16:45:52 +0000
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-03-26 16:45:52 +0000
commitf42970cc6d62a63529874bf7dfe0f6e3c010dd13 (patch)
tree506ced6bc79ae6f531bcc66e4ffd293fc6396eec /haddock-library/test/Documentation
parent10437c8cfe3524eee7e1cc297cd6ae7dff16dbb3 (diff)
Update test to account for \r filtering
Diffstat (limited to 'haddock-library/test/Documentation')
-rw-r--r--haddock-library/test/Documentation/Haddock/ParserSpec.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/haddock-library/test/Documentation/Haddock/ParserSpec.hs b/haddock-library/test/Documentation/Haddock/ParserSpec.hs
index 44ec2988..9161160d 100644
--- a/haddock-library/test/Documentation/Haddock/ParserSpec.hs
+++ b/haddock-library/test/Documentation/Haddock/ParserSpec.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE OverloadedStrings, FlexibleInstances #-}
+{-# LANGUAGE LambdaCase #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Documentation.Haddock.ParserSpec (main, spec) where
@@ -55,8 +56,10 @@ spec = do
it "accepts hexadecimal character references" $ do
"&#x65;" `shouldParseTo` "e"
- it "allows to backslash-escape characters" $ do
- property $ \x -> ['\\', x] `shouldParseTo` DocString [x]
+ it "allows to backslash-escape characters except \\r" $ do
+ property $ \case
+ '\r' -> "\\\r" `shouldParseTo` DocString "\\"
+ x -> ['\\', x] `shouldParseTo` DocString [x]
context "when parsing strings contaning numeric character references" $ do
it "will implicitly convert digits to characters" $ do