tasty 0.10 → 0.10.0.1
raw patch · 5 files changed
+13/−25 lines, 5 filesdep ~basedep ~optparse-applicative
Dependency ranges changed: base, optparse-applicative
Files
- Test/Tasty/Ingredients/ConsoleReporter.hs +2/−5
- Test/Tasty/Options.hs +2/−5
- Test/Tasty/Options/Core.hs +6/−11
- Test/Tasty/Patterns.hs +1/−2
- tasty.cabal +2/−2
Test/Tasty/Ingredients/ConsoleReporter.hs view
@@ -29,7 +29,6 @@ import Data.Typeable import Data.Foldable (foldMap) import Options.Applicative-import Options.Applicative.Types (ReadM(..)) import System.IO import System.Console.ANSI @@ -366,10 +365,8 @@ ) where name = untag (optionName :: Tagged UseColor String)- parse =- ReadM .- maybe (Left (ErrorMsg $ "Could not parse " ++ name)) Right .- parseValue+ parse = str >>=+ maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue -- | @useColor when isTerm@ decides if colors should be used, -- where @isTerm@ denotes where @stdout@ is a terminal device.
Test/Tasty/Options.hs view
@@ -29,7 +29,6 @@ import Data.Foldable import Options.Applicative-import Options.Applicative.Types -- | An option is a data type that inhabits the `IsOption` type class. class Typeable v => IsOption v where@@ -71,10 +70,8 @@ where name = untag (optionName :: Tagged v String) helpString = untag (optionHelp :: Tagged v String)- parse =- ReadM .- maybe (Left (ErrorMsg $ "Could not parse " ++ name)) Right .- parseValue+ parse = str >>=+ maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue data OptionValue = forall v . IsOption v => OptionValue v
Test/Tasty/Options/Core.hs view
@@ -14,7 +14,6 @@ import Data.Tagged import Data.Fixed import Options.Applicative-import Options.Applicative.Types (ReadM(..)) import Test.Tasty.Options import Test.Tasty.Patterns@@ -34,17 +33,15 @@ optionName = return "num-threads" optionHelp = return "Number of threads to use for tests execution" optionCLParser =- nullOption parse+ option parse ( short 'j' <> long name <> help (untag (optionHelp :: Tagged NumThreads String)) ) where name = untag (optionName :: Tagged NumThreads String)- parse =- ReadM .- maybe (Left (ErrorMsg $ "Could not parse " ++ name)) Right .- parseValue+ parse = str >>=+ maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue -- | Timeout to be applied to individual tests data Timeout@@ -64,17 +61,15 @@ optionName = return "timeout" optionHelp = return "Timeout for individual tests (suffixes: ms,s,m,h; default: s)" optionCLParser =- nullOption parse+ option parse ( short 't' <> long name <> help (untag (optionHelp :: Tagged Timeout String)) ) where name = untag (optionName :: Tagged Timeout String)- parse =- ReadM .- maybe (Left (ErrorMsg $ "Could not parse " ++ name)) Right .- parseValue+ parse = str >>=+ maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue parseTimeout :: String -> Maybe Integer parseTimeout str =
Test/Tasty/Patterns.hs view
@@ -47,7 +47,6 @@ import Data.Tagged import Options.Applicative-import Options.Applicative.Types (ReadM(..)) data Token = SlashToken | WildcardToken@@ -90,7 +89,7 @@ optionName = return "pattern" optionHelp = return "Select only tests that match pattern" optionCLParser =- option (ReadM . Right . parseTestPattern)+ option (fmap parseTestPattern str) ( short 'p' <> long (untag (optionName :: Tagged TestPattern String)) <> help (untag (optionHelp :: Tagged TestPattern String))
tasty.cabal view
@@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/ name: tasty-version: 0.10+version: 0.10.0.1 synopsis: Modern and extensible testing framework description: Tasty is a modern testing framework for Haskell. It lets you combine your unit tests, golden@@ -53,7 +53,7 @@ mtl, tagged >= 0.5, regex-tdfa-rc >= 1.1.8.2,- optparse-applicative >= 0.10,+ optparse-applicative >= 0.11, deepseq >= 1.3, unbounded-delays >= 0.1, async >= 2.0,