megaparsec-tests 9.2.1 → 9.2.2
raw patch · 5 files changed
+40/−36 lines, 5 filesdep ~basedep ~megaparsecPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, megaparsec
API changes (from Hackage documentation)
Files
- megaparsec-tests.cabal +12/−12
- tests/Text/Megaparsec/ErrorSpec.hs +4/−1
- tests/Text/Megaparsec/PosSpec.hs +2/−2
- tests/Text/Megaparsec/StreamSpec.hs +20/−20
- tests/Text/MegaparsecSpec.hs +2/−1
megaparsec-tests.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.4 name: megaparsec-tests-version: 9.2.1+version: 9.2.2 license: BSD-2-Clause license-file: LICENSE.md maintainer: Mark Karpov <markkarpov92@gmail.com> author: Megaparsec contributors-tested-with: ghc ==8.10.7 ghc ==9.0.2 ghc ==9.2.1+tested-with: ghc ==9.0.2 ghc ==9.2.4 ghc ==9.4.1 homepage: https://github.com/mrkkrp/megaparsec bug-reports: https://github.com/mrkkrp/megaparsec/issues synopsis: Test utilities and the test suite of Megaparsec@@ -25,15 +25,15 @@ default-language: Haskell2010 build-depends: QuickCheck >=2.10 && <2.15,- base >=4.13 && <5.0,+ base >=4.15 && <5.0, bytestring >=0.2 && <0.12, containers >=0.5 && <0.7, hspec >=2.0 && <3.0, hspec-expectations >=0.8 && <0.9, hspec-megaparsec >=2.0 && <3.0,- megaparsec ==9.2.1,+ megaparsec ==9.2.2, mtl >=2.2.2 && <3.0,- text >=0.2 && <1.3,+ text >=0.2 && <2.1, transformers >=0.4 && <0.7 if flag(dev)@@ -45,10 +45,10 @@ ghc-options: -O2 -Wall test-suite tests- type: exitcode-stdio-1.0- main-is: Spec.hs+ type: exitcode-stdio-1.0+ main-is: Spec.hs build-tool-depends: hspec-discover:hspec-discover >=2.0 && <3.0- hs-source-dirs: tests+ hs-source-dirs: tests other-modules: Text.Megaparsec.Byte.BinarySpec Text.Megaparsec.Byte.LexerSpec@@ -61,22 +61,22 @@ Text.Megaparsec.StreamSpec Text.MegaparsecSpec - default-language: Haskell2010+ default-language: Haskell2010 build-depends: QuickCheck >=2.10 && <2.15,- base >=4.13 && <5.0,+ base >=4.15 && <5.0, bytestring >=0.2 && <0.12, case-insensitive >=1.2 && <1.3, containers >=0.5 && <0.7, hspec >=2.0 && <3.0, hspec-expectations >=0.8 && <0.9, hspec-megaparsec >=2.0 && <3.0,- megaparsec ==9.2.1,+ megaparsec ==9.2.2, megaparsec-tests, mtl >=2.2.2 && <3.0, parser-combinators >=1.0 && <2.0, scientific >=0.3.1 && <0.4,- text >=0.2 && <1.3,+ text >=0.2 && <2.1, transformers >=0.4 && <0.7 if flag(dev)
tests/Text/Megaparsec/ErrorSpec.hs view
@@ -185,7 +185,10 @@ w = unPos w' tabRep = replicate w ' ' errorBundlePretty bundle- `shouldBe` ( "1:" ++ show (w + 1) ++ ":\n |\n1 | " ++ tabRep+ `shouldBe` ( "1:"+ ++ show (w + 1)+ ++ ":\n |\n1 | "+ ++ tabRep ++ "something" ++ tabRep ++ "\n | "
tests/Text/Megaparsec/PosSpec.hs view
@@ -14,8 +14,8 @@ context "when the argument is a non-positive number" $ it "throws InvalidPosException" $ property $ \n ->- n <= 0- ==> evaluate (mkPos n) `shouldThrow` (== InvalidPosException n)+ n <= 0 ==>+ evaluate (mkPos n) `shouldThrow` (== InvalidPosException n) context "when the argument is not 0" $ it "returns Pos with the given value" $ property $ \n ->
tests/Text/Megaparsec/StreamSpec.hs view
@@ -51,8 +51,8 @@ context "when input is not empty" $ it "unconses a token" $ property $ \s ->- not (null s)- ==> take1_ (s :: String) === Just (head s, tail s)+ not (null s) ==>+ take1_ (s :: String) === Just (head s, tail s) describe "takeN_" $ do context "requested length is 0" $ it "returns Just empty chunk and original stream" $@@ -66,8 +66,8 @@ context "stream is not empty" $ it "returns a chunk of correct length and rest of the stream" $ property $ \(Positive n) s ->- not (null s)- ==> takeN_ n (s :: String) === Just (splitAt n s)+ not (null s) ==>+ takeN_ n (s :: String) === Just (splitAt n s) describe "takeWhile_" $ it "extracts a chunk that is a prefix consisting of matching tokens" $ property $ \s ->@@ -104,8 +104,8 @@ context "when input is not empty" $ it "unconses a token" $ property $ \s ->- not (B.null s)- ==> take1_ (s :: B.ByteString) === B.uncons s+ not (B.null s) ==>+ take1_ (s :: B.ByteString) === B.uncons s describe "takeN_" $ do context "requested length is 0" $ it "returns Just empty chunk and original stream" $@@ -119,8 +119,8 @@ context "stream is not empty" $ it "returns a chunk of correct length and rest of the stream" $ property $ \(Positive n) s ->- not (B.null s)- ==> takeN_ n (s :: B.ByteString) === Just (B.splitAt n s)+ not (B.null s) ==>+ takeN_ n (s :: B.ByteString) === Just (B.splitAt n s) describe "takeWhile_" $ it "extracts a chunk that is a prefix consisting of matching tokens" $ property $ \s ->@@ -158,8 +158,8 @@ context "when input is not empty" $ it "unconses a token" $ property $ \s ->- not (BL.null s)- ==> take1_ (s :: BL.ByteString) === BL.uncons s+ not (BL.null s) ==>+ take1_ (s :: BL.ByteString) === BL.uncons s describe "takeN_" $ do context "requested length is 0" $ it "returns Just empty chunk and original stream" $@@ -173,8 +173,8 @@ context "stream is not empty" $ it "returns a chunk of correct length and rest of the stream" $ property $ \(Positive n) s ->- not (BL.null s)- ==> takeN_ n (s :: BL.ByteString) === Just (BL.splitAt (fromIntegral n) s)+ not (BL.null s) ==>+ takeN_ n (s :: BL.ByteString) === Just (BL.splitAt (fromIntegral n) s) describe "takeWhile_" $ it "extracts a chunk that is a prefix consisting of matching tokens" $ property $ \s ->@@ -212,8 +212,8 @@ context "when input is not empty" $ it "unconses a token" $ property $ \s ->- not (T.null s)- ==> take1_ (s :: T.Text) === T.uncons s+ not (T.null s) ==>+ take1_ (s :: T.Text) === T.uncons s describe "takeN_" $ do context "requested length is 0" $ it "returns Just empty chunk and original stream" $@@ -227,8 +227,8 @@ context "stream is not empty" $ it "returns a chunk of correct length and rest of the stream" $ property $ \(Positive n) s ->- not (T.null s)- ==> takeN_ n (s :: T.Text) === Just (T.splitAt n s)+ not (T.null s) ==>+ takeN_ n (s :: T.Text) === Just (T.splitAt n s) describe "takeWhile_" $ it "extracts a chunk that is a prefix consisting of matching tokens" $ property $ \s ->@@ -265,8 +265,8 @@ context "when input is not empty" $ it "unconses a token" $ property $ \s ->- not (TL.null s)- ==> take1_ (s :: TL.Text) === TL.uncons s+ not (TL.null s) ==>+ take1_ (s :: TL.Text) === TL.uncons s describe "takeN_" $ do context "requested length is 0" $ it "returns Just empty chunk and original stream" $@@ -280,8 +280,8 @@ context "stream is not empty" $ it "returns a chunk of correct length and rest of the stream" $ property $ \(Positive n) s ->- not (TL.null s)- ==> takeN_ n (s :: TL.Text) === Just (TL.splitAt (fromIntegral n) s)+ not (TL.null s) ==>+ takeN_ n (s :: TL.Text) === Just (TL.splitAt (fromIntegral n) s) describe "takeWhile_" $ it "extracts a chunk that is a prefix consisting of matching tokens" $ property $ \s ->
tests/Text/MegaparsecSpec.hs view
@@ -803,7 +803,8 @@ p = let g = count' 1 3 . char in v- <$> withRecovery (\e -> Left e <$ g 'b') (Right <$> g 'a') <*> g 'c'+ <$> withRecovery (\e -> Left e <$ g 'b') (Right <$> g 'a')+ <*> g 'c' v (Right x) y = Right (x ++ y) v (Left m) _ = Left m ma = if a < 3 then etok 'a' else mempty