packages feed

test-framework 0.8.2.1 → 0.8.2.2

raw patch · 3 files changed

+34/−35 lines, 3 filesdep −libxmldep −utf8-stringdep ~QuickCheck

Dependencies removed: libxml, utf8-string

Dependency ranges changed: QuickCheck

Files

ChangeLog.md view
@@ -1,3 +1,10 @@+#### 0.8.2.2++_2025-04-11, Andreas Abel_++- Drop `libxml` dependency in testsuite+- Tested building with GHC 8.0 - 9.12.2+ #### 0.8.2.1  _2025-02-26, Andreas Abel_
test-framework.cabal view
@@ -1,6 +1,6 @@ Cabal-Version:       1.18 Name:                test-framework-Version:             0.8.2.1+Version:             0.8.2.2 Category:            Testing Synopsis:            Framework for running and organising tests, with HUnit and QuickCheck support Description:         Allows tests such as QuickCheck properties and HUnit test cases to be assembled into test groups, run in@@ -15,10 +15,10 @@ Build-Type:          Simple  Tested-With:-  GHC == 9.12.1+  GHC == 9.12.2   GHC == 9.10.1   GHC == 9.8.4-  GHC == 9.6.6+  GHC == 9.6.7   GHC == 9.4.8   GHC == 9.2.8   GHC == 9.0.2@@ -59,16 +59,17 @@                                 Test.Framework.Runners.XML                                 Test.Framework.Utilities -        Build-Depends:          base           >= 4.9    && < 5-                              , ansi-terminal  >= 0.4.0  && < 1.2-                              , ansi-wl-pprint >= 0.6.7  && < 1.1-                              , random         >= 1.1    && < 1.4-                              , containers     >= 0.1    && < 0.8-                              , regex-posix    >= 0.72   && < 0.97-                              , old-locale     >= 1.0    && < 1.1-                              , time           >= 1.6    && < 1.15-                              , xml            >= 1.3.5  && < 1.4-                              , hostname       >= 1.0    && < 1.1+        -- Lower bounds picked from LTS-7.24 (GHC 8.0.1)+        Build-Depends:          base           >= 4.9      && < 5+                              , ansi-terminal  >= 0.6.3    && < 1.2+                              , ansi-wl-pprint >= 0.6.7    && < 1.1+                              , random         >= 1.1      && < 1.4+                              , containers     >= 0.5.7    && < 1+                              , regex-posix    >= 0.95.2   && < 0.97+                              , old-locale     >= 1.0      && < 1.1+                              , time           >= 1.6      && < 1.15+                              , xml            >= 1.3.14   && < 1.4+                              , hostname       >= 1.0      && < 1.1          Default-Language:       Haskell2010         Default-Extensions:     CPP@@ -108,25 +109,21 @@         Main-Is:                Tests.hs         Type:                   exitcode-stdio-1.0 -        -- Doe to libxml dependency, the testsuite is not buildable on e.g. MacOS-        -- Buildable:              False-+        -- Lower bounds from LTS-9.21 (GHC 8.0.2)         Build-Depends:          HUnit          >= 1.5.0.0                               , QuickCheck     >= 2.9.2   && < 2.16                               , base           >= 4.9     && < 5                               , random         >= 1.1-                              , containers     >= 0.1-                              , ansi-terminal  >= 0.4.0+                              , containers     >= 0.5.7+                              , ansi-terminal  >= 0.6.3                               , ansi-wl-pprint >= 0.6.7-                              , regex-posix    >= 0.72+                              , regex-posix    >= 0.95.2                               , old-locale     >= 1.0                               , time           >= 1.6-                              , xml            >= 1.3.5+                              , xml            >= 1.3.14                               , hostname       >= 1.0-                              , libxml         >= 0.1.1-                              , bytestring     >= 0.9+                              , bytestring     >= 0.10.8                               , semigroups     >= 0.18-                              , utf8-string    >= 1.0.1.1 && <1.1          Default-Language:       Haskell2010         Default-Extensions:     CPP
test/Test/Framework/Tests/Runners/XMLTests.hs view
@@ -8,19 +8,14 @@  import Test.HUnit.Base               ( Test(..), (@?=) ) import Test.QuickCheck               ( Arbitrary, sized, Gen, oneof, listOf, arbitrary )-import Test.QuickCheck.Property as P ( Property )+import qualified Test.QuickCheck.Property as QC ( Property, property )  import Control.Monad ( ap, liftM2, liftM3 )  import Data.Maybe ( isJust ) -import qualified Data.ByteString.UTF8 as UTF8--import qualified Text.XML.Light as XML         ( findAttr, unqual )-import qualified Text.XML.LibXML.Parser as XML ( parseMemory_ )-import qualified Text.XML.LibXML.Types as XML  ( Document )--import Test.QuickCheck.Property as P (morallyDubiousIOProperty)+import qualified Text.XML.Light as XML         ( Element, findAttr, unqual )+import qualified Text.XML.Light.Input as XML   ( parseXMLDoc )  -- | `Arbitrary` instance for `TestResult` generation. instance Arbitrary FinishedTest where@@ -89,11 +84,11 @@  -- | Generate random `RunDescriptions`, serialize to (flat) XML strings, then check that they are XML -- TODO: check them against the JUnit schema-property :: RunDescription -> P.Property-property = morallyDubiousIOProperty . fmap isJust . parseSerialize+property :: RunDescription -> QC.Property+property = QC.property . isJust . parseSerialize -parseSerialize :: RunDescription -> IO (Maybe XML.Document)-parseSerialize = XML.parseMemory_ . UTF8.fromString . serialize False+parseSerialize :: RunDescription -> Maybe XML.Element+parseSerialize = XML.parseXMLDoc . serialize False  -- | Verify that the group names are properly prepended to sub-tests. test :: Test