refactor
This commit is contained in:
parent
aea694ed3f
commit
0a3541a8d5
1 changed files with 14 additions and 13 deletions
27
Test.hs
27
Test.hs
|
@ -83,19 +83,6 @@ import qualified Utility.Gpg
|
||||||
|
|
||||||
main :: [String] -> IO ()
|
main :: [String] -> IO ()
|
||||||
main ps = do
|
main ps = do
|
||||||
let tests = testGroup "Tests"
|
|
||||||
-- Test both direct and indirect mode.
|
|
||||||
-- Windows is only going to use direct mode,
|
|
||||||
-- so don't test twice.
|
|
||||||
[ properties
|
|
||||||
#ifndef mingw32_HOST_OS
|
|
||||||
, withTestEnv True $ unitTests "(direct)"
|
|
||||||
, withTestEnv False $ unitTests "(indirect)"
|
|
||||||
#else
|
|
||||||
, withTestEnv False $ unitTests ""
|
|
||||||
#endif
|
|
||||||
]
|
|
||||||
|
|
||||||
-- Can't use tasty's defaultMain because one of the command line
|
-- Can't use tasty's defaultMain because one of the command line
|
||||||
-- parameters is "test".
|
-- parameters is "test".
|
||||||
let pinfo = info (helper <*> suiteOptionParser ingredients tests)
|
let pinfo = info (helper <*> suiteOptionParser ingredients tests)
|
||||||
|
@ -124,6 +111,20 @@ ingredients =
|
||||||
, rerunningTests [consoleTestReporter]
|
, rerunningTests [consoleTestReporter]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
tests :: TestTree
|
||||||
|
tests = testGroup "Tests"
|
||||||
|
-- Test both direct and indirect mode.
|
||||||
|
-- Windows is only going to use direct mode, so don't test twice.
|
||||||
|
[ properties
|
||||||
|
#ifndef mingw32_HOST_OS
|
||||||
|
, withTestEnv True $ unitTests "(direct)"
|
||||||
|
, withTestEnv False $ unitTests "(indirect)"
|
||||||
|
#else
|
||||||
|
, withTestEnv False $ unitTests ""
|
||||||
|
#endif
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
properties :: TestTree
|
properties :: TestTree
|
||||||
properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck"
|
properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck"
|
||||||
[ testProperty "prop_idempotent_deencode_git" Git.Filename.prop_idempotent_deencode
|
[ testProperty "prop_idempotent_deencode_git" Git.Filename.prop_idempotent_deencode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue