genvalidity-text 0.4.0.0 → 0.5.0.0
raw patch · 2 files changed
+61/−43 lines, 2 filesdep ~genvaliditydep ~validitydep ~validity-textPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: genvalidity, validity, validity-text
API changes (from Hackage documentation)
Files
- genvalidity-text.cabal +54/−43
- test/Data/GenValidity/TextSpec.hs +7/−0
genvalidity-text.cabal view
@@ -1,49 +1,60 @@-name: genvalidity-text-version: 0.4.0.0-cabal-version: >=1.10-build-type: Simple-license: MIT-license-file: LICENSE-copyright: Copyright: (c) 2016 Tom Sydney Kerckhove-maintainer: syd.kerckhove@gmail.com-homepage: https://github.com/NorfairKing/validity#readme-synopsis: GenValidity support for Text-description:- Please see README.md-category: Testing-author: Tom Sydney Kerckhove+-- This file has been generated from package.yaml by hpack version 0.20.0.+--+-- see: https://github.com/sol/hpack+--+-- hash: 9b8a344767f2ad0220f4e49aff7aa135eac168cf40ec483f58a7ab67ddc61ab6 +name: genvalidity-text+version: 0.5.0.0+synopsis: GenValidity support for Text+description: Please see README.md+category: Testing+homepage: https://github.com/NorfairKing/validity#readme+bug-reports: https://github.com/NorfairKing/validity/issues+author: Tom Sydney Kerckhove+maintainer: syd.kerckhove@gmail.com+copyright: Copyright: (c) 2016-2018 Tom Sydney Kerckhove+license: MIT+license-file: LICENSE+build-type: Simple+cabal-version: >= 1.10+ source-repository head- type: git- location: https://github.com/NorfairKing/validity+ type: git+ location: https://github.com/NorfairKing/validity library- exposed-modules:- Data.GenValidity.Text- build-depends:- base >=4.7 && <5,- validity >=0.4 && <0.5,- validity-text >=0.2 && <0.3,- genvalidity >=0.4 && <0.5,- text -any,- array -any,- QuickCheck -any- default-language: Haskell2010- hs-source-dirs: src+ hs-source-dirs:+ src+ build-depends:+ QuickCheck+ , array+ , base >=4.7 && <5+ , genvalidity >=0.5 && <0.6+ , text+ , validity >=0.5 && <0.6+ , validity-text >=0.3 && <0.4+ exposed-modules:+ Data.GenValidity.Text+ other-modules:+ Paths_genvalidity_text+ default-language: Haskell2010 test-suite genvalidity-text-test- type: exitcode-stdio-1.0- main-is: Spec.hs- build-depends:- base -any,- hspec -any,- QuickCheck -any,- genvalidity -any,- genvalidity-text -any,- genvalidity-hspec -any,- text -any- default-language: Haskell2010- hs-source-dirs: test- other-modules:- Data.GenValidity.TextSpec- ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -fno-warn-name-shadowing+ type: exitcode-stdio-1.0+ main-is: Spec.hs+ hs-source-dirs:+ test+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -fno-warn-name-shadowing+ build-depends:+ QuickCheck+ , base+ , genvalidity+ , genvalidity-hspec+ , genvalidity-text+ , hspec+ , text+ other-modules:+ Data.GenValidity.TextSpec+ Paths_genvalidity_text+ default-language: Haskell2010
test/Data/GenValidity/TextSpec.hs view
@@ -1,8 +1,11 @@+{-# LANGUAGE TypeApplications #-}+ module Data.GenValidity.TextSpec ( spec ) where import Control.Monad+import Data.Either import Data.List import Data.Word import Text.Printf@@ -76,3 +79,7 @@ forAll arbitrary $ \cs -> forAll (textWithoutAnyOf cs) $ \text -> T.unpack text `shouldNotSatisfy` (\t -> any (`elem` t) cs)+ describe "isValid" $+ it "equals isRight . checkValidity" $+ forAll (genUnchecked @Text) $ \t ->+ isValid t `shouldBe` isRight (checkValidity t)