Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.3.1.3: fix regression with tasty-1.5 #42

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
Changes
=======

Unreleased
----------
Version 3.3.1.3 (20 Oct 2023)
---------------

_Dedicated to Anne-Christine. Happy birthday!_

* Fix test reporting when built with `tasty-1.5`
(regression in 3.3.1.2, see [#41](https://github.com/phile314/tasty-silver/issues/41)).
* `filterWithRedex` is now the identity if no inclusion/exclusion regexes are given in the options.
* Drop support for GHC 7.4
* Drop support for GHC 7.4 for the sake of `LambdaCase`.
* Tested with GHC 8.0 - 9.8.1.

Version 3.3.1.2 (10 Sep 2023)
---------------
Expand Down
8 changes: 4 additions & 4 deletions Test/Tasty/Silver/Interactive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -565,12 +565,12 @@ produceOutput opts tree =
let handleTestResult' = (if isInteractive then handleTestResultInteractive else handleTestResult)
return $ HandleTest name printTestName handleTestResult'

handleGroup :: OptionSet -> TestName -> Ap (Reader Level) TestOutput -> Ap (Reader Level) TestOutput
handleGroup :: OptionSet -> TestName -> [Ap (Reader Level) TestOutput] -> Ap (Reader Level) TestOutput
handleGroup _ name grp = Ap $ do
level <- ask
let
printHeading = printf "%s%s\n" (indent level) name
printBody = runReader (getApp grp) (level + 1)
printBody = runReader (getApp $ mconcat grp) (level + 1)
return $ PrintHeading printHeading printBody

in
Expand All @@ -579,9 +579,9 @@ produceOutput opts tree =
trivialFold
{ foldSingle = handleSingleTest
#if MIN_VERSION_tasty(1,5,0)
, foldGroup = \ opts name -> foldMap (handleGroup opts name)
, foldGroup = \ opts name ts -> handleGroup opts name ts
#else
, foldGroup = \ opts name -> id (handleGroup opts name)
, foldGroup = \ opts name t -> handleGroup opts name [t]
#endif
}
opts tree
Expand Down
2 changes: 1 addition & 1 deletion tasty-silver.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.14
name: tasty-silver
version: 3.3.1.2
version: 3.3.1.3
synopsis: A fancy test runner, including support for golden tests.
description:
This package provides a fancy test runner and support for «golden testing».
Expand Down
Loading