tasty-silver 3.2 → 3.2.1
raw patch · 6 files changed
+13/−12 lines, 6 files
Files
- CHANGELOG.md +5/−0
- Test/Tasty/Silver/Filter.hs +1/−1
- Test/Tasty/Silver/Interactive.hs +1/−0
- Test/Tasty/Silver/Internal.hs +1/−6
- tasty-silver.cabal +1/−1
- tests/test.hs +4/−4
CHANGELOG.md view
@@ -1,6 +1,11 @@ Changes ======= +Version 3.2.1+-------------++* Fix option parser (#25)+ Version 3.2 -----------
Test/Tasty/Silver/Filter.hs view
@@ -66,7 +66,7 @@ compileRegex = either (const Nothing) Just . RS.compile R.defaultCompOpt R.defaultExecOpt parseFilter :: forall v . IsOption v => (String -> RegexFilter) -> ([RegexFilter] -> v) -> Parser v-parseFilter mkRF mkV = mkV <$> many ( option parse ( long name <> help helpString))+parseFilter mkRF mkV = mkV <$> some ( option parse ( long name <> help helpString)) where name = untag (optionName :: Tagged v String) helpString = untag (optionHelp :: Tagged v String)
Test/Tasty/Silver/Interactive.hs view
@@ -112,6 +112,7 @@ , Option (Proxy :: Proxy NumThreads) , Option (Proxy :: Proxy ExcludeFilters) , Option (Proxy :: Proxy IncludeFilters)+ , Option (Proxy :: Proxy AcceptTests) ] $ \opts tree -> Just $ runTestsInteractive dis opts (filterWithRegex opts tree)
Test/Tasty/Silver/Internal.hs view
@@ -38,12 +38,7 @@ parseValue = fmap AcceptTests . safeRead optionName = return "accept" optionHelp = return "Accept current results of golden tests"- optionCLParser =- fmap AcceptTests $- switch- ( long (untag (optionName :: Tagged AcceptTests String))- <> help (untag (optionHelp :: Tagged AcceptTests String))- )+ optionCLParser = flagCLParser Nothing (AcceptTests True) -- | Read the file if it exists, else return Nothing. -- Useful for reading golden files.
tasty-silver.cabal view
@@ -1,5 +1,5 @@ name: tasty-silver-version: 3.2+version: 3.2.1 synopsis: A fancy test runner, including support for golden tests. description: This package provides a fancy test runner and support for «golden testing».
tests/test.hs view
@@ -62,8 +62,8 @@ testCheckRF :: TestTree testCheckRF = testGroup "Filter.checkRF"- [ testCase "empty1" $ checkRF True [] "/" @?= True- , testCase "empty1" $ checkRF False [] "/" @?= False- , testCase "empty2" $ checkRF True [] "/sdfg" @?= True- , testCase "empty2" $ checkRF False [] "/sdfg" @?= False+ [ testCase "empty1a" $ checkRF True [] "/" @?= True+ , testCase "empty1b" $ checkRF False [] "/" @?= False+ , testCase "empty2a" $ checkRF True [] "/sdfg" @?= True+ , testCase "empty2b" $ checkRF False [] "/sdfg" @?= False ]