diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-08 00:03:28 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-08 00:03:28 -0400 |
commit | 37a34b3dbcfb38f815edc141a57721d9f94440b4 (patch) | |
tree | f903abdebe58e7bfbcff1c88d5f11c2cb854cc50 | |
parent | 0ade54179ba2db79f72e723eceedfcd6a1757b6f (diff) |
refactor
-rw-r--r-- | Test.hs | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -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 |