summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opml-conduit.cabal21
-rw-r--r--test/HLint.hs8
-rw-r--r--test/Main.hs25
3 files changed, 32 insertions, 22 deletions
diff --git a/opml-conduit.cabal b/opml-conduit.cabal
index 502867d..9b6d67e 100644
--- a/opml-conduit.cabal
+++ b/opml-conduit.cabal
@@ -1,5 +1,5 @@
name: opml-conduit
-version: 0.6.0.3
+version: 0.6.0.4
synopsis: Streaming parser/renderer for the OPML 2.0 format.
description:
This library implements the OPML 2.0 standard (<http://dev.opml.org/spec2.html>) as a 'conduit' parser/renderer.
@@ -23,6 +23,11 @@ source-repository head
type: git
location: git://github.com/k0ral/opml-conduit.git
+flag enable-hlint-test
+ description: Enable hlint test-suite
+ manual: True
+ default: False
+
library
exposed-modules:
Text.OPML
@@ -64,7 +69,6 @@ test-suite tests
, conduit-combinators
, containers
, data-default
- , hlint
, lens-simple
, mono-traversable
, mtl
@@ -83,3 +87,16 @@ test-suite tests
, xml-conduit >= 1.3
default-language: Haskell2010
ghc-options: -Wall -fno-warn-orphans
+
+test-suite hlint
+ if flag(enable-hlint-test)
+ buildable: True
+ else
+ buildable: False
+ type: exitcode-stdio-1.0
+ main-is: HLint.hs
+ build-depends:
+ base >=4.8,
+ hlint -any
+ default-language: Haskell2010
+ hs-source-dirs: test
diff --git a/test/HLint.hs b/test/HLint.hs
new file mode 100644
index 0000000..cc34823
--- /dev/null
+++ b/test/HLint.hs
@@ -0,0 +1,8 @@
+import qualified Language.Haskell.HLint as HLint (hlint)
+import System.Exit
+
+
+main :: IO ()
+main = do
+ result <- HLint.hlint [ "test/", "Text/" ]
+ if null result then exitSuccess else exitFailure
diff --git a/test/Main.hs b/test/Main.hs
index b67f924..0c43911 100644
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -1,10 +1,12 @@
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
-- {{{ Imports
-import Arbitrary ()
+import Text.OPML.Conduit.Parse
+import Text.OPML.Conduit.Render
+import Text.OPML.Lens
+import Arbitrary ()
import Control.Monad.Trans.Resource
-
import Data.Conduit
import Data.Conduit.Combinators as Conduit (sourceFile)
import Data.Default
@@ -12,22 +14,12 @@ import Data.String
import Data.Text.Encoding
import Data.Tree
import Data.Version
-
-import Paths_opml_conduit
-
-import qualified Language.Haskell.HLint as HLint (hlint)
-
import Lens.Simple
-
+import Paths_opml_conduit
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
-
-import Text.OPML.Conduit.Parse
-import Text.OPML.Conduit.Render
-import Text.OPML.Lens
import Text.XML.Stream.Parse as XML
-
import URI.ByteString
-- }}}
@@ -35,7 +27,6 @@ main :: IO ()
main = defaultMain $ testGroup "Tests"
[ unitTests
, properties
- , hlint
]
unitTests :: TestTree
@@ -55,12 +46,6 @@ properties = testGroup "Properties"
]
-hlint :: TestTree
-hlint = testCase "HLint check" $ do
- result <- HLint.hlint [ "test/", "Text/" ]
- null result @?= True
-
-
categoriesCase :: TestTree
categoriesCase = testCase "Parse categories list" $ do
dataFile <- fromString <$> getDataFileName "data/category.opml"