Merge pull request #112 from clinty/testsuites
cabal testsuites for hledger-lib and hledger
This commit is contained in:
commit
ce651bd614
@ -18,12 +18,12 @@ homepage: http://hledger.org
|
|||||||
bug-reports: http://hledger.org/bugs
|
bug-reports: http://hledger.org/bugs
|
||||||
stability: beta
|
stability: beta
|
||||||
tested-with: GHC==7.2.2, GHC==7.4.2, GHC==7.6.1
|
tested-with: GHC==7.2.2, GHC==7.4.2, GHC==7.6.1
|
||||||
cabal-version: >= 1.8
|
cabal-version: >= 1.10
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
-- data-dir: data
|
-- data-dir: data
|
||||||
-- data-files:
|
-- data-files:
|
||||||
-- extra-tmp-files:
|
-- extra-tmp-files:
|
||||||
-- extra-source-files:
|
extra-source-files: tests/suite.hs
|
||||||
-- README
|
-- README
|
||||||
-- sample.ledger
|
-- sample.ledger
|
||||||
-- sample.timelog
|
-- sample.timelog
|
||||||
@ -75,11 +75,39 @@ library
|
|||||||
,transformers >= 0.2 && < 0.4
|
,transformers >= 0.2 && < 0.4
|
||||||
,utf8-string >= 0.3.5 && < 0.4
|
,utf8-string >= 0.3.5 && < 0.4
|
||||||
,HUnit
|
,HUnit
|
||||||
|
default-language: Haskell2010
|
||||||
|
|
||||||
source-repository head
|
source-repository head
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/simonmichael/hledger
|
location: https://github.com/simonmichael/hledger
|
||||||
|
|
||||||
|
test-suite tests
|
||||||
|
type: exitcode-stdio-1.0
|
||||||
|
main-is: tests/suite.hs
|
||||||
|
ghc-options: -Wall
|
||||||
|
build-depends: hledger-lib
|
||||||
|
, base >= 4.3 && < 5
|
||||||
|
, cmdargs
|
||||||
|
, containers
|
||||||
|
, csv
|
||||||
|
, directory
|
||||||
|
, filepath
|
||||||
|
, HUnit
|
||||||
|
, mtl
|
||||||
|
, old-locale
|
||||||
|
, old-time
|
||||||
|
, parsec
|
||||||
|
, pretty-show
|
||||||
|
, regex-compat
|
||||||
|
, regexpr
|
||||||
|
, safe
|
||||||
|
, split
|
||||||
|
, test-framework
|
||||||
|
, test-framework-hunit
|
||||||
|
, time
|
||||||
|
, transformers
|
||||||
|
default-language: Haskell2010
|
||||||
|
|
||||||
-- cf http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html
|
-- cf http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html
|
||||||
|
|
||||||
-- Additional dependencies:
|
-- Additional dependencies:
|
||||||
|
|||||||
6
hledger-lib/tests/suite.hs
Normal file
6
hledger-lib/tests/suite.hs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import Hledger (tests_Hledger)
|
||||||
|
import Test.Framework.Providers.HUnit (hUnitTestToTests)
|
||||||
|
import Test.Framework.Runners.Console (defaultMain)
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = defaultMain $ hUnitTestToTests tests_Hledger
|
||||||
@ -19,12 +19,12 @@ homepage: http://hledger.org
|
|||||||
bug-reports: http://hledger.org/bugs
|
bug-reports: http://hledger.org/bugs
|
||||||
stability: beta
|
stability: beta
|
||||||
tested-with: GHC==7.2.2, GHC==7.4.2, GHC==7.6.1
|
tested-with: GHC==7.2.2, GHC==7.4.2, GHC==7.6.1
|
||||||
cabal-version: >= 1.8
|
cabal-version: >= 1.10
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
-- data-dir: data
|
-- data-dir: data
|
||||||
-- data-files:
|
-- data-files:
|
||||||
extra-tmp-files:
|
extra-tmp-files:
|
||||||
extra-source-files:
|
extra-source-files: tests/suite.hs
|
||||||
|
|
||||||
-- Cabal-Version: >= 1.9.2
|
-- Cabal-Version: >= 1.9.2
|
||||||
-- Test-Suite test-hledger
|
-- Test-Suite test-hledger
|
||||||
@ -83,6 +83,7 @@ library
|
|||||||
,text == 0.11.*
|
,text == 0.11.*
|
||||||
,time
|
,time
|
||||||
,utf8-string >= 0.3.5 && < 0.4
|
,utf8-string >= 0.3.5 && < 0.4
|
||||||
|
default-language: Haskell2010
|
||||||
|
|
||||||
-- should depend on the above to avoid double compilation but this is
|
-- should depend on the above to avoid double compilation but this is
|
||||||
-- still too complicated as of 2011/6/1 because:
|
-- still too complicated as of 2011/6/1 because:
|
||||||
@ -136,3 +137,36 @@ executable hledger
|
|||||||
,text == 0.11.*
|
,text == 0.11.*
|
||||||
,time
|
,time
|
||||||
,utf8-string >= 0.3.5 && < 0.4
|
,utf8-string >= 0.3.5 && < 0.4
|
||||||
|
default-language: Haskell2010
|
||||||
|
|
||||||
|
test-suite tests
|
||||||
|
type: exitcode-stdio-1.0
|
||||||
|
main-is: tests/suite.hs
|
||||||
|
ghc-options: -Wall
|
||||||
|
build-depends: hledger-lib
|
||||||
|
, hledger
|
||||||
|
, base >= 4.3 && < 5
|
||||||
|
, cmdargs
|
||||||
|
, containers
|
||||||
|
, csv
|
||||||
|
, directory
|
||||||
|
, filepath
|
||||||
|
, haskeline
|
||||||
|
, HUnit
|
||||||
|
, mtl
|
||||||
|
, old-locale
|
||||||
|
, old-time
|
||||||
|
, parsec
|
||||||
|
, pretty-show
|
||||||
|
, process
|
||||||
|
, regex-compat
|
||||||
|
, regexpr
|
||||||
|
, safe
|
||||||
|
, shakespeare-text
|
||||||
|
, split
|
||||||
|
, test-framework
|
||||||
|
, test-framework-hunit
|
||||||
|
, text
|
||||||
|
, time
|
||||||
|
, transformers
|
||||||
|
default-language: Haskell2010
|
||||||
|
|||||||
6
hledger/tests/suite.hs
Normal file
6
hledger/tests/suite.hs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import Hledger.Cli (tests_Hledger_Cli)
|
||||||
|
import Test.Framework.Providers.HUnit (hUnitTestToTests)
|
||||||
|
import Test.Framework.Runners.Console (defaultMain)
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = defaultMain $ hUnitTestToTests tests_Hledger_Cli
|
||||||
Loading…
Reference in New Issue
Block a user