[commit: haddock] master, wip/api-annots-ghc-7.10-3: Update test to account for \r filtering (f42970c)
git at git.haskell.org
git at git.haskell.org
Wed Jul 8 08:37:47 UTC 2015
Repository : ssh://git@git.haskell.org/haddock
On branches: master,wip/api-annots-ghc-7.10-3
Link : http://git.haskell.org/haddock.git/commitdiff/f42970cc6d62a63529874bf7dfe0f6e3c010dd13
>---------------------------------------------------------------
commit f42970cc6d62a63529874bf7dfe0f6e3c010dd13
Author: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
Date: Thu Mar 26 16:45:52 2015 +0000
Update test to account for \r filtering
>---------------------------------------------------------------
f42970cc6d62a63529874bf7dfe0f6e3c010dd13
haddock-library/test/Documentation/Haddock/ParserSpec.hs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/haddock-library/test/Documentation/Haddock/ParserSpec.hs b/haddock-library/test/Documentation/Haddock/ParserSpec.hs
index 44ec298..9161160 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
"e" `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
More information about the ghc-commits
mailing list