From ff8d582bedb35d2b15f09222861a294be99759b5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 4 Sep 2018 12:48:06 -0700 Subject: [PATCH] test: drop hunit support from the test command --- hledger/Hledger/Cli/Commands.hs | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/hledger/Hledger/Cli/Commands.hs b/hledger/Hledger/Cli/Commands.hs index 89cae60ba..c3c50b8e0 100644 --- a/hledger/Hledger/Cli/Commands.hs +++ b/hledger/Hledger/Cli/Commands.hs @@ -37,8 +37,6 @@ module Hledger.Cli.Commands ( ) where --- import Control.Concurrent -import Control.Monad import Data.Default import Data.List import Data.List.Split (splitOn) @@ -222,14 +220,11 @@ testmode = hledgerCommandMode Run the unit tests built in to hledger-lib and hledger, printing results on stdout and exiting with success or failure. -Tests are run in two batches: easytest-based and hunit-based tests. -If any test fails or gives an error, the exit code will be non-zero. +If a scope argument is provided, only tests in that (exact, case-sensitive) +scope are run. -If a pattern argument (case sensitive) is provided, only easytests -in that scope and only hunit tests whose name contains it are run. - -If a numeric second argument is provided, it will set the randomness -seed for easytests. +If a numeric second argument is provided, it will set the randomness seed, +for any tests which use randomness. FLAGS |] @@ -245,13 +240,8 @@ FLAGS testcmd :: CliOpts -> Journal -> IO () testcmd opts _undefined = do let args = words' $ query_ $ reportopts_ opts - putStrLn "\n=== easytest tests: ===\n" - e1 <- runEasyTests args $ EasyTest.tests [easytests_Hledger, easytests_Commands] - 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 + e <- runEasyTests args $ EasyTest.tests [easytests_Hledger, easytests_Commands] + if e then exitFailure else exitSuccess -- unit tests of hledger command-line executable @@ -321,10 +311,6 @@ easytests_Commands = tests "Commands" [ ] -tests_Hledger_Cli_Commands = TestList [ - - ] - -- test data