chell 0.3 → 0.3.1
raw patch · 3 files changed
+31/−17 lines, 3 filesdep −system-filepath
Dependencies removed: system-filepath
Files
- chell.cabal +6/−7
- lib/Test/Chell/Main.hs +9/−10
- lib/Test/Chell/Types.hs +16/−0
chell.cabal view
@@ -1,5 +1,5 @@ name: chell-version: 0.3+version: 0.3.1 license: MIT license-file: license.txt author: John Millikin <jmillikin@gmail.com>@@ -49,13 +49,13 @@ @ source-repository head- type: bazaar- location: https://john-millikin.com/branches/chell/0.3/+ type: git+ location: https://john-millikin.com/code/chell/ source-repository this- type: bazaar- location: https://john-millikin.com/branches/chell/0.3/- tag: chell_0.3+ type: git+ location: https://john-millikin.com/code/chell/+ tag: chell_0.3.1 flag color-output description: Enable colored output in test results@@ -71,7 +71,6 @@ , options >= 0.1 && < 0.2 , patience >= 0.1 && < 0.2 , random >= 1.0- , system-filepath >= 0.4 && < 0.5 , template-haskell >= 2.3 , text , transformers >= 0.2
lib/Test/Chell/Main.hs view
@@ -15,7 +15,6 @@ import System.Random (randomIO) import Text.Printf (printf) -import qualified Filesystem.Path.CurrentOS as Path import Options import Test.Chell.Output@@ -30,11 +29,11 @@ , optionDescription = "Print more output" }) - pathOption "optXmlReport" "xml-report" Path.empty+ stringOption "optXmlReport" "xml-report" "" "Write a parsable report to a given path, in XML."- pathOption "optJsonReport" "json-report" Path.empty+ stringOption "optJsonReport" "json-report" "" "Write a parsable report to a given path, in JSON."- pathOption "optTextReport" "text-report" Path.empty+ stringOption "optTextReport" "text-report" "" "Write a human-readable report to a given path." option "optSeed" (\o -> o@@ -132,14 +131,14 @@ getReports :: MainOptions -> [(String, String, Report)] getReports opts = concat [xml, json, text] where xml = case optXmlReport opts of- p | Path.null p -> []- p -> [(Path.encodeString p, "XML", xmlReport)]+ "" -> []+ path -> [(path, "XML", xmlReport)] json = case optJsonReport opts of- p | Path.null p -> []- p -> [(Path.encodeString p, "JSON", jsonReport)]+ "" -> []+ path -> [(path, "JSON", jsonReport)] text = case optTextReport opts of- p | Path.null p -> []- p -> [(Path.encodeString p, "text", textReport)]+ "" -> []+ path -> [(path, "text", textReport)] jsonReport :: [(Test, TestResult)] -> String jsonReport results = Writer.execWriter writer where
lib/Test/Chell/Types.hs view
@@ -274,6 +274,22 @@ -- tests_Math -- test_Show -- @+--+-- Compatibility note: in GHC 7.0 and earlier, a maximum of 20 parameters may+-- be passed to variadic functions. Suites containing more than 20 children+-- may cause a compilation error that looks like:+--+-- >Context reduction stack overflow; size = 21+-- >Use -fcontext-stack=N to increase stack size to N+-- > $dBuildSuite :: BuildSuite (Suite -> Test -> Test -> Suite)+--+-- There are three potential solutions:+--+-- 1. If possible, upgrade to a more recent version of GHC.+--+-- 2. Set the GHC flag @-fcontext-stack@ to a larger number.+--+-- 3. Re-organize your tests such that no suite has more than 20 children. suite :: BuildSuite a => String -> a suite name = addChildren (Suite name [])