test-framework 0.4.2.1 → 0.4.2.2
raw patch · 4 files changed
+9/−18 lines, 4 filesdep ~base
Dependency ranges changed: base
Files
- Test/Framework/Runners/Console.hs +4/−12
- Test/Framework/Runners/Console/Run.hs +1/−1
- Test/Framework/Runners/Options.hs +3/−4
- test-framework.cabal +1/−1
Test/Framework/Runners/Console.hs view
@@ -71,11 +71,8 @@ (NoArg (mempty { ropt_xml_nested = Just True })) "use nested testsuites to represent groups in JUnit XML (not standards compliant)", Option [] ["plain"]- (NoArg (mempty { ropt_color_mode = Just ColorNever }))+ (NoArg (mempty { ropt_plain_output = Just True })) "do not use any ANSI terminal features to display the test run",- Option [] ["color"]- (NoArg (mempty { ropt_color_mode = Just ColorAlways }))- "use ANSI terminal features to display the test run", Option [] ["hide-successes"] (NoArg (mempty { ropt_hide_successes = Just True })) "hide sucessful tests, and only show failures"@@ -126,14 +123,9 @@ -- Get a lazy list of the test results, as executed in parallel running_tests <- runTests ropts' tests-- isplain <- case unK $ ropt_color_mode ropts' of- ColorAuto -> not `fmap` hIsTerminalDevice stdout- ColorNever -> return True- ColorAlways -> return False-+ -- Show those test results to the user as we get them- fin_tests <- showRunTestsTop isplain (unK $ ropt_hide_successes ropts') running_tests+ fin_tests <- showRunTestsTop (unK $ ropt_plain_output ropts') (unK $ ropt_hide_successes ropts') running_tests let test_statistics' = gatherStatistics fin_tests -- Output XML report (if requested)@@ -154,6 +146,6 @@ ropt_test_patterns = K $ ropt_test_patterns ro `orElse` mempty, ropt_xml_output = K $ ropt_xml_output ro `orElse` Nothing, ropt_xml_nested = K $ ropt_xml_nested ro `orElse` False,- ropt_color_mode = K $ ropt_color_mode ro `orElse` ColorAuto,+ ropt_plain_output = K $ ropt_plain_output ro `orElse` False, ropt_hide_successes = K $ ropt_hide_successes ro `orElse` False }
Test/Framework/Runners/Console/Run.hs view
@@ -18,7 +18,7 @@ import Text.PrettyPrint.ANSI.Leijen -import Data.Monoid (mempty)+import Data.Monoid import Control.Arrow (second, (&&&)) import Control.Monad (unless)
Test/Framework/Runners/Options.hs view
@@ -6,7 +6,6 @@ import Data.Monoid -data ColorMode = ColorAuto | ColorNever | ColorAlways type RunnerOptions = RunnerOptions' Maybe type CompleteRunnerOptions = RunnerOptions' K@@ -16,7 +15,7 @@ ropt_test_patterns :: f [TestPattern], ropt_xml_output :: f (Maybe FilePath), ropt_xml_nested :: f Bool,- ropt_color_mode :: f ColorMode,+ ropt_plain_output :: f Bool, ropt_hide_successes :: f Bool } @@ -27,7 +26,7 @@ ropt_test_patterns = Nothing, ropt_xml_output = Nothing, ropt_xml_nested = Nothing,- ropt_color_mode = Nothing,+ ropt_plain_output = Nothing, ropt_hide_successes = Nothing } @@ -37,6 +36,6 @@ ropt_test_patterns = mappendBy ropt_test_patterns ro1 ro2, ropt_xml_output = mappendBy ropt_xml_output ro1 ro2, ropt_xml_nested = getLast (mappendBy (Last . ropt_xml_nested) ro1 ro2),- ropt_color_mode = getLast (mappendBy (Last . ropt_color_mode) ro1 ro2),+ ropt_plain_output = getLast (mappendBy (Last . ropt_plain_output) ro1 ro2), ropt_hide_successes = getLast (mappendBy (Last . ropt_hide_successes) ro1 ro2) }
test-framework.cabal view
@@ -1,5 +1,5 @@ Name: test-framework-Version: 0.4.2.1+Version: 0.4.2.2 Cabal-Version: >= 1.2.3 Category: Testing Synopsis: Framework for running and organising tests, with HUnit and QuickCheck support