Merge pull request #10655 from geekosaur/cleanup-token
[cabal.git] / Cabal-tests / tests / UnitTests / Distribution / PkgconfigVersion.hs
blob8f2d32e0779150599337e7819cb8d6a037473d2a
1 module UnitTests.Distribution.PkgconfigVersion (pkgconfigVersionTests) where
3 import Test.Tasty
4 import Test.Tasty.QuickCheck
6 import Distribution.Parsec (eitherParsec)
7 import Distribution.Pretty
8 import Distribution.Types.PkgconfigVersionRange
10 import Test.QuickCheck.Instances.Cabal ()
12 pkgconfigVersionTests :: [TestTree]
13 pkgconfigVersionTests =
14 [ testProperty "simpleParsec . prettyShow = Just" prop_parse_disp
17 prop_parse_disp :: PkgconfigVersionRange -> Property
18 prop_parse_disp vr = counterexample (show (prettyShow vr)) $
19 eitherParsec (prettyShow vr) === Right vr