test: drop hunit support from the test command
This commit is contained in:
parent
807e6dc4af
commit
ff8d582bed
@ -37,8 +37,6 @@ module Hledger.Cli.Commands (
|
|||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
-- import Control.Concurrent
|
|
||||||
import Control.Monad
|
|
||||||
import Data.Default
|
import Data.Default
|
||||||
import Data.List
|
import Data.List
|
||||||
import Data.List.Split (splitOn)
|
import Data.List.Split (splitOn)
|
||||||
@ -222,14 +220,11 @@ testmode = hledgerCommandMode
|
|||||||
Run the unit tests built in to hledger-lib and hledger,
|
Run the unit tests built in to hledger-lib and hledger,
|
||||||
printing results on stdout and exiting with success or failure.
|
printing results on stdout and exiting with success or failure.
|
||||||
|
|
||||||
Tests are run in two batches: easytest-based and hunit-based tests.
|
If a scope argument is provided, only tests in that (exact, case-sensitive)
|
||||||
If any test fails or gives an error, the exit code will be non-zero.
|
scope are run.
|
||||||
|
|
||||||
If a pattern argument (case sensitive) is provided, only easytests
|
If a numeric second argument is provided, it will set the randomness seed,
|
||||||
in that scope and only hunit tests whose name contains it are run.
|
for any tests which use randomness.
|
||||||
|
|
||||||
If a numeric second argument is provided, it will set the randomness
|
|
||||||
seed for easytests.
|
|
||||||
|
|
||||||
FLAGS
|
FLAGS
|
||||||
|]
|
|]
|
||||||
@ -245,13 +240,8 @@ FLAGS
|
|||||||
testcmd :: CliOpts -> Journal -> IO ()
|
testcmd :: CliOpts -> Journal -> IO ()
|
||||||
testcmd opts _undefined = do
|
testcmd opts _undefined = do
|
||||||
let args = words' $ query_ $ reportopts_ opts
|
let args = words' $ query_ $ reportopts_ opts
|
||||||
putStrLn "\n=== easytest tests: ===\n"
|
e <- runEasyTests args $ EasyTest.tests [easytests_Hledger, easytests_Commands]
|
||||||
e1 <- runEasyTests args $ EasyTest.tests [easytests_Hledger, easytests_Commands]
|
if e then exitFailure else exitSuccess
|
||||||
when (not e1) $ putStr "\n"
|
|
||||||
putStrLn "=== hunit tests: ===\n"
|
|
||||||
e2 <- runHunitTests args tests_Hledger_Cli_Commands
|
|
||||||
putStrLn ""
|
|
||||||
if or [e1, e2] then exitFailure else exitSuccess
|
|
||||||
|
|
||||||
-- unit tests of hledger command-line executable
|
-- unit tests of hledger command-line executable
|
||||||
|
|
||||||
@ -321,10 +311,6 @@ easytests_Commands = tests "Commands" [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
tests_Hledger_Cli_Commands = TestList [
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
-- test data
|
-- test data
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user