update jinja2 per CVE-2024-34064
[cabal.git] / Cabal-tests / tests / UnitTests / Distribution / System.hs
blobd09b1b7f61b2b9d0b29fe9503a218ac641fdd11a
1 {-# OPTIONS_GHC -fno-warn-orphans #-}
2 module UnitTests.Distribution.System
3 ( tests
4 ) where
6 import Distribution.Parsec
7 import Distribution.Pretty
8 import Distribution.System
9 import Test.Tasty
10 import Test.Tasty.QuickCheck (testProperty)
11 import Test.QuickCheck (Property, (===))
12 import Test.QuickCheck.Instances.Cabal ()
14 textRoundtrip :: (Show a, Eq a, Pretty a, Parsec a) => a -> Property
15 textRoundtrip x = simpleParsec (prettyShow x) === Just x
17 tests :: [TestTree]
18 tests =
19 [ testProperty "Text OS round trip" (textRoundtrip :: OS -> Property)
20 , testProperty "Text Arch round trip" (textRoundtrip :: Arch -> Property)
21 , testProperty "Text Platform round trip" (textRoundtrip :: Platform -> Property)