This commit is contained in:
Joey Hess 2015-07-08 00:03:28 -04:00
parent aea694ed3f
commit 0a3541a8d5

27
Test.hs
View file

@ -83,19 +83,6 @@ import qualified Utility.Gpg
main :: [String] -> IO ()
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
-- parameters is "test".
let pinfo = info (helper <*> suiteOptionParser ingredients tests)
@ -124,6 +111,20 @@ ingredients =
, 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 = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck"
[ testProperty "prop_idempotent_deencode_git" Git.Filename.prop_idempotent_deencode