add missing test runner
This commit is contained in:
parent
715a2b7f22
commit
73bc81cd7e
24
tools/unittest.hs
Normal file
24
tools/unittest.hs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{-
|
||||||
|
A standalone unit test runner using test-framework. Compared to hledger's
|
||||||
|
built-in test runner, this one shows verbose ansi-colored hierarchic
|
||||||
|
results, can run tests in parallel, and may have better quickcheck support.
|
||||||
|
-}
|
||||||
|
|
||||||
|
import Test.Framework (defaultMain {-, testGroup-})
|
||||||
|
import Test.Framework.Providers.HUnit (hUnitTestToTests)
|
||||||
|
--import Test.Framework.Providers.QuickCheck2 (testProperty)
|
||||||
|
import Test.HUnit hiding (Test)
|
||||||
|
import qualified Test.HUnit (Test)
|
||||||
|
--import Test.QuickCheck
|
||||||
|
import Tests (tests)
|
||||||
|
import System.Exit (-- exitFailure, exitWith,
|
||||||
|
ExitCode(..))
|
||||||
|
import System.IO (hGetContents, hPutStr, hFlush, stderr, stdout)
|
||||||
|
import Text.Printf (printf)
|
||||||
|
--import Text.ParserCombinators.Parsec
|
||||||
|
import Control.Monad (liftM,when)
|
||||||
|
import Data.Maybe (fromMaybe)
|
||||||
|
import System.Process (runInteractiveCommand, waitForProcess)
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = defaultMain $ concatMap hUnitTestToTests tests
|
||||||
Loading…
Reference in New Issue
Block a user