From 922c55dd71e681bd490a433af5338a955b9a3bcf Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 13 Mar 2023 22:59:10 -0500 Subject: [PATCH] Run test suite from main cabal --- libxml-sax.cabal | 16 +++++++++++++++- tests/Tests.hs | 31 ++++++++++++++++--------------- tests/libxml-sax-tests.cabal | 18 ------------------ 3 files changed, 31 insertions(+), 34 deletions(-) delete mode 100644 tests/libxml-sax-tests.cabal diff --git a/libxml-sax.cabal b/libxml-sax.cabal index 436b5ca..3935715 100644 --- a/libxml-sax.cabal +++ b/libxml-sax.cabal @@ -5,7 +5,7 @@ license-file: license.txt author: John Millikin maintainer: jmillikin@gmail.com build-type: Simple -cabal-version: >= 1.6 +cabal-version: >= 1.8 category: Foreign, Text, XML, Parsing stability: experimental homepage: https://john-millikin.com/software/haskell-libxml/ @@ -45,3 +45,17 @@ library extra-libraries: xml2 pkgconfig-depends: libxml-2.0 + +test-suite test + type: exitcode-stdio-1.0 + main-is: tests/Tests.hs + + build-depends: + base > 4.1 && < 5.0 + , bytestring + , containers + , libxml-sax + , text + , transformers + , xml-types + , chell >= 0.5 && < 0.6 diff --git a/tests/Tests.hs b/tests/Tests.hs index c6b9fc9..289101b 100644 --- a/tests/Tests.hs +++ b/tests/Tests.hs @@ -19,21 +19,22 @@ import qualified Text.XML.LibXML.SAX as SAX import qualified Data.XML.Types as X tests :: Suite -tests = suite "libxml-sax" - test_Instruction - test_Comment - test_InternalSubset - test_InternalSubsetEmpty - test_ExternalSubset - test_Element - test_Content - test_ContentNoReference - test_PlainCDATA - test_PassthroughCDATA - test_AttributeContent - test_AttributeContentNoReference - test_AttributeOrder - test_AttributeContentAmpersand +tests = suite "libxml-sax" [ + test_Instruction, + test_Comment, + test_InternalSubset, + test_InternalSubsetEmpty, + test_ExternalSubset, + test_Element, + test_Content, + test_ContentNoReference, + test_PlainCDATA, + test_PassthroughCDATA, + test_AttributeContent, + test_AttributeContentNoReference, + test_AttributeOrder, + test_AttributeContentAmpersand + ] main :: IO () main = defaultMain [tests] diff --git a/tests/libxml-sax-tests.cabal b/tests/libxml-sax-tests.cabal deleted file mode 100644 index c5c7077..0000000 --- a/tests/libxml-sax-tests.cabal +++ /dev/null @@ -1,18 +0,0 @@ -name: libxml-sax-tests -version: 0 -build-type: Simple -cabal-version: >= 1.6 - -executable libxml-sax-tests - main-is: Tests.hs - ghc-options: -Wall -O2 - - build-depends: - base > 4.1 && < 5.0 - , bytestring - , containers - , libxml-sax - , text - , transformers - , xml-types - , chell >= 0.3 && < 0.4 -- 2.38.5