mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 15:14:49 +03:00
test: drop verbose test runner and testpack dependency
This commit is contained in:
parent
3865759bbd
commit
927948a644
@ -87,7 +87,7 @@ options = [
|
||||
#endif
|
||||
,Option "h" ["help"] (NoArg Help) "show this help"
|
||||
,Option "V" ["version"] (NoArg Version) "show version information"
|
||||
,Option "v" ["verbose"] (NoArg Verbose) "show verbose test output"
|
||||
,Option "v" ["verbose"] (NoArg Verbose) "show more verbose output"
|
||||
,Option "" ["binary-filename"] (NoArg BinaryFilename) "show the download filename for this hledger build"
|
||||
,Option "" ["debug"] (NoArg Debug) "show extra debug output; implies verbose"
|
||||
,Option "" ["debug-vty"] (NoArg DebugVty) "run vty command with no vty output, showing console"
|
||||
|
@ -29,7 +29,6 @@ $ hledger -f sample.ledger balance o
|
||||
module Hledger.Cli.Tests
|
||||
where
|
||||
import qualified Data.Map as Map
|
||||
import Test.HUnit.Tools (runVerboseTests)
|
||||
import System.Exit (exitFailure, exitWith, ExitCode(ExitSuccess)) -- base 3 compatible
|
||||
import System.Time (ClockTime(TOD))
|
||||
|
||||
@ -45,13 +44,11 @@ import Hledger.Cli.Utils
|
||||
-- | Run unit tests.
|
||||
runtests :: [Opt] -> [String] -> IO ()
|
||||
runtests _ args = do
|
||||
(counts,_) <- runner ts
|
||||
(counts,_) <- liftM (flip (,) 0) $ runTestTT ts
|
||||
if errors counts > 0 || (failures counts > 0)
|
||||
then exitFailure
|
||||
else exitWith ExitSuccess
|
||||
where
|
||||
runner | Verbose `elem` opts = runVerboseTests
|
||||
| otherwise = liftM (flip (,) 0) . runTestTT
|
||||
ts = TestList $ filter matchname $ tflatten tests -- show flat test names
|
||||
-- ts = tfilter matchname $ TestList tests -- show hierarchical test names
|
||||
matchname = matchpats args . tname
|
||||
|
@ -233,7 +233,7 @@ Here is the command-line help:
|
||||
--port web: serve on tcp port N (default 5000)
|
||||
-h --help show this help
|
||||
-V --version show version information
|
||||
-v --verbose show verbose test output
|
||||
-v --verbose show more verbose output
|
||||
--binary-filename show the download filename for this hledger build
|
||||
--debug show extra debug output; implies verbose
|
||||
--debug-vty run vty command with no vty output, showing console
|
||||
|
@ -84,7 +84,6 @@ executable hledger
|
||||
,process
|
||||
,regexpr >= 0.5.1
|
||||
,safe >= 0.2
|
||||
,testpack >= 1 && < 2
|
||||
,time
|
||||
,utf8-string >= 0.3
|
||||
|
||||
@ -162,7 +161,6 @@ library
|
||||
,process
|
||||
,regexpr >= 0.5.1
|
||||
,safe >= 0.2
|
||||
,testpack >= 1 && < 2
|
||||
,time
|
||||
,utf8-string >= 0.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user