Add cabal testsuite for hledger.

This commit is contained in:
Clint Adams 2013-05-15 15:55:49 -04:00
parent 1cbe6c95b2
commit 180521996a
2 changed files with 42 additions and 2 deletions

View File

@ -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
View 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