2024-11-03
- Partially revert #393 to fix progress reporting outside of Emacs.
- Do not depend on
unbounded-delays
onppc64
,s390x
andriscv64
(#371, #422, #423).
2024-06-22
- Performance improvements (#389, #390).
- Progress reporting in Emacs: use
\r
instead of ANSI escape sequences (#393). - Console reporter: fix unintended change to
foldHeading
(#396). - Prune empty test subtrees from
TestTree
(#403). - Add
instance Eq Timeout
andinstance Ord Timeout
(#415). - Add ability to supply options for launchers and reporters at the top-level of test tree (#417).
2023-09-10
- Progress reporting is no longer ignored.
PrintTest
constructor ofTestOutput
now has an extra field used to report progress. Supplyconst (pure ())
as this extra field value if you want to skip progress reporting (#311). foldGroup
now takes[b]
instead ofb
as its last argument to allow for custom fold strategies. This is a backwards incompatible change, but you can get the old behavior by applyingmconcat
(#364).- Dependency loop error now lists all test cases that formed a cycle (#340).
- Dependencies can now be defined pattern-free with
sequentialTestGroup
(#343). - Added
--min-duration-to-report
flag that specifies the time a test must take beforetasty
outputs timing information (#341). - When a test failed with an exception, print it using
displayException
instead ofshow
(#330). - The
-p
/--pattern
option can be specified multiple times; only tests that match all patterns are run (#380). - Fix color scheme to make info messages visible in terminals with white background (#369).
- When parsing of a command-line option failed, report received option (#368).
- Support WASM (#365).
- Tested with GHC 8.0 - 9.8.
2022-12-18
- Drop
unbounded-delays
dependency on 64-bit machines (#344). - Drop
clock
dependency, decomissionclock
flag (#345). - Drop
wcwidth
dependency (#346) - Tested with GHC 8.0 - 9.4.
2022-05-10
- Drop
mtl
dependency - Warning-free under GHC 8.0 - 9.2
2022-05-10
- Fix compilation with
mtl-2.3
- Tested with GHC 8.0 - 9.2; dropped support for GHC 7.x
Fix warnings under GHC 9.2
- Add
consoleTestReporterWithHook
- Suggest pattern to rerun an individual failing test
- Add
Test.Tasty.Patterns.Printer
Deduplicate command line options when there is more than one TestReporter.
Expose the function that does that, uniqueOptionDescriptions
.
Fix CPP warning/error macro expansion producing 'defined' has undefined behavior
Automatically disable the dependency on the clock
package when compiled by ghcjs.
The only point of this release is to introduce compatibility with GHCs back to 7.0 (see #287).
Note, however, that these changes are not merged to the master branch, and the future releases will only support the GHC/base versions from the last 5 years, as per our usual policy. To test with even older GHCs, you'll have to use this particular version of tasty (or have the constraint solver pick it for you when testing with older GHCs).
The source of this release is in the support-old-ghcs
branch of the tasty
repository.
- Change the
TreeFold
data type to give all functions access toOptionSet
- Fix a bug where a looping failure message escaped the time out set for the test
- Fix a bug where pattern changes inside the
TestTree
weren't respected
- Add an ability for a test provider to print colorful/formatted output
IsOption
has a new methodshowDefaultValue
for customizing howdefaultValue
s are rendered in the--help
output.- Drop support for GHCs older than 5 years
- Do not install handlers for the signals that dump core
- Export the
AnsiTricks
type/option - In addition to a
Parser
,optionParser
andsuiteOptionParser
now return a[String]
representing warning messages:- A warning is emitted if an
IsOption
instance defines multiple options in the implementation ofoptionCLParser
. - An warning is emitted if an
IsOption
instance'soptionCLParser
implementation assigns a default value (e.g., withOptions.Applicative.value
), as this interferes withtasty
's ability to read environment variable arguments.
- A warning is emitted if an
- Expose
computeStatistics
fromTest.Tasty.Ingredients.ConsoleReporter
. - Ensure that
finally
andbracket
work as expected inside tests when the test suite is interrupted by Ctrl-C.
- Expose timed and getTime
- Add parseOptions
- Allow to disable ANSI tricks with --ansi-tricks=false
- Document and expose installSignalHandlers
- Enable colors in Emacs and other almost-ANSI-capable terminals
Make it possible to declare dependencies between tests (see the README for details)
Make tasty work with GHCJS
Fix compatibility with GHC 8.6
Fix a bug where some (mostly Asian) characters would break alignment in the terminal output
Fix a bug where -l
was still using /
instead of .
as a field separator
NOTE: This major release contains some breaking changes to the semantics of patterns.
In the original pattern design I didn't notice the conflict between using /
as
a field separator and as the AWK syntax for pattern matching /.../
.
The new patterns have been around for a relatively short time (5 months), so hopefully the breakage won't be too big. I'm sorry about any problems caused by the change.
See #220 for the discussion.
-
The field separator in patterns is changed from slash (
/
) to period (.
), and.
is now allowed in raw patterns.The field separator is used to join the group names and the test name when comparing to a pattern such as
-p foo
or-p /foo/
.If you used
-p 'foo/bar'
or
-p '/foo\/bar/'
before, now you should use
-p 'foo.bar'
or
-p '/foo.bar/'
if you meant "test/group
bar
inside groupfoo
, or-p '/foo\/bar/'
if you meant "test/group containing
foo/bar
in the name".The need for escaping the slash inside the
/.../
pattern was precisely the motivation for this change. -
Raw patterns (ones that are not AWK expressions) may no longer contain slashes (
/
).So
-p 'foo/bar'
is no longer allowed, and
-p '/foo/'
is now parsed as an AWK expression
/foo/
, whereas before it was treated as a raw pattern and converted to/\/foo\//
.The reason for this change is that
/foo/
is a valid AWK expression and should be parsed as such. -
Raw patterns may now contain hyphens, so e.g.
-p type-checking
now works.In theory this makes some valid AWK expressions (such as
NF-2
) not to be parsed as such, but they are either unlikely to be useful or could also be expressed in other ways (NF!=2
). -
Several new exports, mostly for testing/debugging patterns:
TestPattern
now has aShow
instance;TestPattern
andExpr
now haveEq
instances.- The constructors of
TestPattern
are now exported. parseAwkExpr
is introduced and can be used in ghci to see how an AWK expression is parsed. (For parsing test patterns, which include raw patterns in addition to AWK expression, useparseTestPattern
.)
Fix a bug where a test suite that uses resources would hang if interrupted
- Add a
safeReadBool
function, for case-insensitive parsing of boolean options - Convert all tasty's own options to case-insensitive
Adjust lower bounds for the dependencies (mtl and optparse-applicative)
- New pattern language (see the README and/or the blog post)
- Make the
clock
dependency optional
Fix compatibility with GHC 8.4
Backward compat breaking revision of Test.Tasty.Ingredients.ConsoleReporter
that exposes the name of tests/groups.
Expose and document several of the internals of
Test.Tasty.Ingredients.ConsoleReporter
.
Fix compatibility with GHC 7.4
- Make the
--quiet
mode more efficient on a large number of tests - Fix a bug where a cursor would disappear if the test suite was terminated by a signal other than SIGINT.
Make filtering tests (-p
) work faster
Fix a critical bug in the quiet mode (-q
/--quiet
):
the exit status could be wrong or the test suite could hang.
Fix compatibility with the latest unbounded-delays
Add composeReporters
, a function to run multiple reporter ingredients
Introduce mkOptionCLParser
and mkFlagCLParser
Fix compatibility with optparse-applicative-0.13
Switch from regex-tdfa-rc
to regex-tdfa
, which got a new maintainer.
Clarify IsTest
’s specification with regard to exceptions
Use monotonic clock when measuring durations.
New field resultShortDescription
of Result
- Improve the docs
- Fix compatibility with GHC HEAD
- Prevent parsing non-positive number of threads via program options (#104)
- Buffer output to avoid slowdowns when printing test results (#101)
- Default to using the maximum number of available cores for test execution
Export Test.Tasty.Runners.formatMessage
Don't output ANSI codes for the Emacs terminal emulator
Better handle the situation when there are no ingredients to run
Split the changelog into per-project changelogs
Update to optparse-applicative 0.11
- Add the
--color
option - Timings
- Introduce the
Time
type synonym - Change the types of
launchTestTree
andTestReporter
to accept the total run time consoleTestReporter
now displays the timings
- Introduce the
Upgrade to optparse-applicative-0.10.
Be careful not to export the Show (a -> b)
instance, see
#71
Hide cursor when running tests
Fix for GHC 7.9
Remove the old 'colors' flag description from the cabal file
Make ansi-terminal an unconditional dependency
Test.Tasty.Ingredients
is now exposedTest.Tasty.Ingredients.Basic
is added, which exports the ingredients defined in thetasty
package. These exports should now be used instead of ones exported fromTest.Tasty.Runners
- The
Result
type is now structured a bit differently. Providers now should usetestPassed
andtestFailed
functions instead of constructingResult
s directly. - Add «quiet mode» (see README)
- Add «hide successes» mode (see README)
- Add short command-line options:
-j
for--num-threads
,-p
for--pattern
- Add timeout support
AppMonoid
is renamed toTraversal
for consistency with the 'reducers' package. Another similar wrapper,Ap
, is introduced.- Fix a resources bug (resources were not released if the test suite was interrupted)
- The type of
launchTestTree
is changed. It now takes a continuation as an argument. This is necessary to fix the bug mentioned above. - Add
flagCLParser
to be used as theoptionCLParser
implementation for boolean options. - Add the ability to pass options via environment
- Use
regex-tdfa
instead ofregex-posix
(which is a native implementation, and as such is more portable) foldTestTree
now takes the algebra in the form of a record rather than multiple arguments, to minimize breakage when new nodes are added or existing ones changewithResource
now passes the IO action to get the resource to the inner test tree
- Better handling of exceptions that arise during resource creation or disposal
- Expose the
AppMonoid
wrapper - Add
askOption
andinludingOptions
Depend on ansi-terminal >= 0.6.1. This fixes some issues with colors on Windows.
- Export
Result
andProgress
fromTest.Tasty.Runners
- Make it clear that only GHC 7.4+ is supported
Export ResourceSpec
from Test.Tasty.Runners
Add a capability to acquire and release resources. See the «Resources» section
in the Test.Tasty
docs.
For the end users, the API is backwards-compatible.
Test runners may have to be adjusted — there is a new constructor of TestTree
and a new argument of foldTestTree
.
Add defaultIngredients
Print the failure description in red
Fix a bug (#25)
The big change in this release is introduction of ingredients, which is a replacement for runners. But unless you have a custom runner, this is unlikely to affect you much.
The Ingredient
data type has replaced the Runner
type.
The following functions have been renamed and possibly changed their types:
defaultMainWithRunner
→defaultMainWithIngredients
treeOptionParser
→suiteOptionParser
getTreeOptions
→treeOptions
runUI
→consoleTestReporter
Added in this release:
suiteOptions
optionParser
- functions operating on ingredients
testsNames
- the
listingTests
ingredient and its option,ListTests
NumThreads
is no longer a core option, but is automatically included in the
test reporting ingredients (see its haddock).
- Proper reporting of (some) non-terminating tests (#15)
- Upgrade to optparse-applicative 0.6
- Restrict dependency versions
- Fix a bug where non-terminating test would lead to a deadlock (#15)
- Add an
execRunner
function - Make
Runner
returnIO Bool
Set lower bound on optparse-applicative dependency version