summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-13 13:19:20 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-13 13:20:10 -0400
commit52cfabcd567a3b15c8217edce752f3a3c59ca5ce (patch)
treef0512188b4e56640fcceeec0dddb9c754ed23783 /Utility
parent8e9ddfe41e73662be5c7fd0ebc6432a52b1dd227 (diff)
wire tasty's option parser into the main program option parser
This makes bash completion work for git-annex test, and is generally cleaner.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/SubTasty.hs25
1 files changed, 0 insertions, 25 deletions
diff --git a/Utility/SubTasty.hs b/Utility/SubTasty.hs
deleted file mode 100644
index 5164f9d1b..000000000
--- a/Utility/SubTasty.hs
+++ /dev/null
@@ -1,25 +0,0 @@
-{- Running tasty as a subcommand.
- -
- - Copyright 2015 Joey Hess <id@joeyh.name>
- -
- - License: BSD-2-clause
- -}
-
-module Utility.SubTasty where
-
-import Test.Tasty
-import Test.Tasty.Options
-import Test.Tasty.Runners
-import Options.Applicative
-
--- Uses tasty's option parser, modified to expect a subcommand.
-parseOpts :: String -> [Ingredient] -> TestTree -> [String] -> IO OptionSet
-parseOpts subcommand is ts =
- handleParseResult . execParserPure (prefs idm) pinfo
- where
- pinfo = info (helper <*> subpinfo) (fullDesc <> header desc)
- subpinfo = subparser $ command subcommand $
- suiteOptionParser is ts
- `info`
- progDesc desc
- desc = "Builtin test suite"