test: drop verbose test runner and testpack dependency

This commit is contained in:
Simon Michael 2010-07-01 02:24:38 +00:00
parent 3865759bbd
commit 927948a644
4 changed files with 3 additions and 8 deletions

View File

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

View File

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

View File

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

View File

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