diff options
author | Simon Hengel <sol@typeful.net> | 2014-11-16 08:58:40 +0800 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2014-11-16 10:20:19 +0800 |
commit | 06517a6a4c5c6c7a89ea4ad57d85ffc458393a07 (patch) | |
tree | aa06a22a299eb9d8f7e5efa5528a7c31534bd6d3 /haddock-library/test/Documentation/Haddock/Parser | |
parent | c2b84c0c55bce1120db9826391de0466c33b3062 (diff) |
(wip) Add support for @since (closes #26)
Diffstat (limited to 'haddock-library/test/Documentation/Haddock/Parser')
-rw-r--r-- | haddock-library/test/Documentation/Haddock/Parser/UtilSpec.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/haddock-library/test/Documentation/Haddock/Parser/UtilSpec.hs b/haddock-library/test/Documentation/Haddock/Parser/UtilSpec.hs index 32dd11d4..10c701c7 100644 --- a/haddock-library/test/Documentation/Haddock/Parser/UtilSpec.hs +++ b/haddock-library/test/Documentation/Haddock/Parser/UtilSpec.hs @@ -5,6 +5,7 @@ import Documentation.Haddock.Parser.Monad import Documentation.Haddock.Parser.Util import Data.Either.Compat (isLeft) import Test.Hspec +import Control.Applicative main :: IO () main = hspec spec @@ -13,10 +14,10 @@ spec :: Spec spec = do describe "takeUntil" $ do it "takes everything until a specified byte sequence" $ do - parseOnly (takeUntil "end") "someend" `shouldBe` Right "some" + snd <$> parseOnly (takeUntil "end") "someend" `shouldBe` Right "some" it "requires the end sequence" $ do - parseOnly (takeUntil "end") "someen" `shouldSatisfy` isLeft + snd <$> parseOnly (takeUntil "end") "someen" `shouldSatisfy` isLeft it "takes escaped bytes unconditionally" $ do - parseOnly (takeUntil "end") "some\\endend" `shouldBe` Right "some\\end" + snd <$> parseOnly (takeUntil "end") "some\\endend" `shouldBe` Right "some\\end" |