diff options
author | koral <> | 2017-11-23 23:27:00 (GMT) |
---|---|---|
committer | hdiff <hdiff@hdiff.luite.com> | 2017-11-23 23:27:00 (GMT) |
commit | 814967f39542fb170164daa961fc8a76be236734 (patch) | |
tree | e8329cee43caeefb90ee80ead2ec9e5d52cff8b9 | |
parent | 321fa47109f7346eefe59502593b215063a0ff89 (diff) |
version 0.6.0.40.6.0.4
-rw-r--r-- | opml-conduit.cabal | 21 | ||||
-rw-r--r-- | test/HLint.hs | 8 | ||||
-rw-r--r-- | test/Main.hs | 25 |
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" |