hspec 2.9.7 → 2.11.17
raw patch · 8 files changed
Files
- CHANGES.markdown +142/−3
- LICENSE +1/−1
- hspec.cabal +11/−8
- src/Test/Hspec.hs +4/−3
- src/Test/Hspec/Discover.hs +3/−1
- src/Test/Hspec/Formatters.hs +8/−2
- src/Test/Hspec/QuickCheck.hs +34/−2
- version.yaml +7/−1
CHANGES.markdown view
@@ -1,3 +1,142 @@+## Changes in 2.11.17 (2026-03-04)+ - Compatibility with QuickCheck 2.18++## Changes in 2.11.16 (2025-12-12)+ - Add support for MicroHs++## Changes in 2.11.15 (2025-12-08)+ - Remove redundant `tf-random` dependency++## Changes in 2.11.14 (2025-09-30)+ - Make sure that `--pretty` completes in *O(n)* time++## Changes in 2.11.13 (2025-09-15)+ - Make diff algorithm line based+ - Improve pretty-printing of nested records++## Changes in 2.11.12 (2025-03-17)+ - Add `--no-rerun` and `--no-rerun-all-on-success`++## Changes in 2.11.11 (2025-02-17)+ - Compatibility with GHC 9.12++## Changes in 2.11.10 (2024-11-16)+ - Add (experimental) extensions API+ - Handle small terminal sizes more gracefully when reporting progress+ - Correctly indent multi-line pending messages+ - Use "erase in line" ANSI sequence to clear transient output (instead of+ overwriting it with spaces)++## Changes in 2.11.9 (2024-05-24)+ - Compatibility with GHC 9.10.1+ - Drop support for GHC 7.10.3++## Changes in 2.11.8 (2024-04-22)+ - Make the build pass with QuickCheck 2.15++## Changes in 2.11.7 (2023-10-22)+ - Include `--seed` in the note on how to rurun a failing item.++## Changes in 2.11.6 (2023-10-11)+ - Compatibility with GHC 9.8.1+ - Run cleanup actions on `--fail-fast` (see #860)++## Changes in 2.11.5 (2023-09-20)+ - Add `--show-exceptions` and `--display-exceptions`++## Changes in 2.11.4 (2023-07-20)+ - Depend on `hspec-expectations-0.8.4`++## Changes in 2.11.3 (2023-07-10)+ - Suppress informational output from QuickCheck when+ `Test.QuickCheck.Args.chatty` is `False` (#840)++## Changes in 2.11.2 (2023-07-06)+ - Add `--expert` mode++## Changes in 2.11.1 (2023-05-28)+ - Depend on `hspec-expectations-0.8.3`++## Changes in 2.11.0.1 (2023-04-28)+ - Don't crash when home directories are unsupported (WASM/WASI) (thanks+ @amesgen)++## Changes in 2.11.0 (2023-04-21)+ - Drop support for GHC < 7.10.3+ - Improve coloring of whitespace-only segments on `--diff`+ - Add `ColorizedReason` constructor to `FailureReason`+ - Provide a new package `hspec-api`, a stable API that can be used to extend+ Hspec's functionality.+ - Deprecate `Test.Hspec.Core.Formatters.V1` in favor of+ `Test.Hspec.Api.Formatters.V1`+ - Add `--fail-on=empty-description`+ - Print slow spec items to `stderr` instead of `stdout`+ - Handle quoting/escaping in `.hspec` files+ - Flush output handle after reporting progress on `-fprogress`++## Changes in 2.10.10 (2023-03-07)+ - Re-export `sequential` from `Test.Hspec`+ - Rerun `beforeAll` / `afterAll` on `--rerun-all-on-success` (#768)++## Changes in 2.10.9 (2023-01-13)+ - Print error message on `-—fail-on=empty`+ - Only fail on `-—fail-on=empty` if at least one spec item has been filtered+ - Re-export more types from `Test.Hspec.Core.Runner`+ - Fix a pretty-printing bug where `[]` would be pretty-printed as `""`+ - Don't pretty-print if the expected and actual value would be equal after+ pretty-printing+ - Prevent deadlocks on unguarded exceptions in runner (#771)++## Changes in 2.10.8 (2022-12-19)+ - Add pretty-printing support for rational numbers+ - Force / evaluate exceptions recursively (#763)+ - Add `xprop` and `fprop`, which use `xit` and `fit` (thanks @lehins)++## Changes in 2.10.7 (2022-12-03)+ - Do not depend on `ghc` for pretty-printing (#750, #752)++## Changes in 2.10.6 (2022-09-13)+ - Suppress excessive diff output (#449)+ - Allow the use of an external diff program. This can e.g. be used by+ setting `HSPEC_DIFF_COMMAND="diff -u --color -L expected -L actual"` or+ `HSPEC_DIFF_COMMAND="git diff"`+ - Do not imply `--fail-on=empty` on `--strict`++## Changes in 2.10.5 (2022-09-09)+ - Add `--fail-on`. This subsums `--fail-on-focused` and `--fail-on-pending`.+ - Add `--fail-on=empty` (#650)+ - Add `registerFormatter` and `registerDefaultFormatter` to+ `Test.Hspec.Runner`.+ - Revert deprecation of `Test.Hspec.Formatters` and+ `Test.Hspec.Core.Formatters`. Instead the module documentation now says+ that they are deprecated in favor of `Test.Hspec.Core.Formatters.V1`.++## Changes in 2.10.4 (2022-09-06)+ - Make sure that whitespace-only diff output is colorized properly (#660)++## Changes in 2.10.3 (2022-09-05)+ - Deprecate `Test.Hspec.Formatters` and `Test.Hspec.Core.Formatters`+ - Disable (most) warnings in files generated by `hspec-discover` (#702)++## Changes in 2.10.2 (2022-09-03)+ - Add `--strict`+ - Add `--fail-on-pending`+ - Do not depend on `clock`++## Changes in 2.10.1 (2022-08-22)+ - Support for GHC 9.4.1+ - Generated modules now include an export list++## Changes in 2.10.0.1 (2022-08-06)+ - Fix a deadlock with nested failed `aroundAll`s (see #679)++## Changes in 2.10.0 (2022-05-12)+ - Allow to transform the config in `SpecM`+ - Allow to customize pretty-printing (via `configPrettyPrintFunction`)+ - Add `getSpecDescriptionPath` (#637, thanks @srid)+ - Do not treat `afterAll` as another spec item (fixes #414, #364, #363)+ - Change type of `paramsSmallCheckDepth` to Maybe (see #345)+ ## Changes in 2.9.7 - Ensure that interim output does not interfere with output from tests This facilitates using `print` when debugging test cases.@@ -462,7 +601,7 @@ `--print-cpu-time`. ## Changes in 1.4.0- - We now have a manual at http://hspec.github.io/. The sources are in+ - We now have a manual at https://hspec.github.io/. The sources are in `doc/`. It's still work in progress. Contributions are very welcome! - The Haddock documentation now indicates the stability of each exposed module. `Test.Hspec` is now considered stable.@@ -630,7 +769,7 @@ ] ``` -Specs consisting of several *desribes*, combined with `descriptions`, continue+Specs consisting of several *describes*, combined with `descriptions`, continue to work unchanged. But `descriptions` is now a noop, and it will be removed in a future release. So it is a good idea to drop it. @@ -663,7 +802,7 @@ ### A new monadic API for custom Formatters For all the details, have a look at the [docs]-(http://hackage.haskell.org/packages/archive/hspec/latest/doc/html/Test-Hspec-Formatters.html).+(https://hackage.haskell.org/packages/archive/hspec/latest/doc/html/Test-Hspec-Formatters.html). ### The total time required to run a spec is now included in the summary
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2011-2022 Simon Hengel <sol@typeful.net>+Copyright (c) 2011-2026 Simon Hengel <sol@typeful.net> Copyright (c) 2011-2012 Trystan Spangler <trystan.s@comcast.net> Copyright (c) 2011-2011 Greg Weber <greg@gregweber.info>
hspec.cabal view
@@ -1,14 +1,14 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.7.+-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: hspec-version: 2.9.7+version: 2.11.17 license: MIT license-file: LICENSE-copyright: (c) 2011-2022 Simon Hengel,+copyright: (c) 2011-2026 Simon Hengel, (c) 2011-2012 Trystan Spangler, (c) 2011 Greg Weber maintainer: Simon Hengel <sol@typeful.net>@@ -16,7 +16,8 @@ category: Testing stability: experimental bug-reports: https://github.com/hspec/hspec/issues-homepage: http://hspec.github.io/+author: Simon Hengel <sol@typeful.net>+homepage: https://hspec.github.io/ synopsis: A Testing Framework for Haskell description: Hspec is a testing framework for Haskell. Some of Hspec's distinctive features are:@@ -29,7 +30,7 @@ . * automatic discovery of test files .- The Hspec Manual is at <http://hspec.github.io/>.+ The Hspec Manual is at <https://hspec.github.io/>. extra-source-files: version.yaml CHANGES.markdown@@ -45,9 +46,9 @@ build-depends: QuickCheck >=2.12 , base ==4.*- , hspec-core ==2.9.7- , hspec-discover ==2.9.7- , hspec-expectations ==0.8.2.*+ , hspec-core ==2.11.17+ , hspec-discover ==2.11.17+ , hspec-expectations ==0.8.4.* exposed-modules: Test.Hspec Test.Hspec.Discover@@ -57,3 +58,5 @@ other-modules: Paths_hspec default-language: Haskell2010+ if impl(ghc)+ cpp-options: -DENABLE_SPEC_HOOK_ARGS
src/Test/Hspec.hs view
@@ -4,14 +4,14 @@ -- Hspec is a testing framework for Haskell. -- -- This is the library reference for Hspec.--- The <http://hspec.github.io/ User's Manual> contains more in-depth+-- The <https://hspec.github.io/ User's Manual> contains more in-depth -- documentation. module Test.Hspec ( -- * Types Spec , SpecWith-, Arg , Example+, Arg -- * Setting expectations , module Test.Hspec.Expectations@@ -23,6 +23,7 @@ , context , example , parallel+, sequential , runIO -- * Pending spec items@@ -39,7 +40,7 @@ , xdescribe , xcontext --- * Focused spec items+-- * Focused spec items #focus# -- | -- During a test run, when a spec contains /focused/ spec items, all other spec -- items are ignored.
src/Test/Hspec/Discover.hs view
@@ -1,3 +1,5 @@+{-# OPTIONS_GHC -fno-warn-deprecations #-}+{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE FlexibleInstances #-} module Test.Hspec.Discover {-# WARNING "This module is used by @hspec-discover@. It is not part of the public API and may change at any time."@@ -13,7 +15,7 @@ import Test.Hspec.Core.Spec import Test.Hspec.Core.Runner-import Test.Hspec.Formatters+import Test.Hspec.Core.Formatters.V1 class IsFormatter a where toFormatter :: a -> IO Formatter
src/Test/Hspec/Formatters.hs view
@@ -1,2 +1,8 @@-module Test.Hspec.Formatters (module Test.Hspec.Core.Formatters) where-import Test.Hspec.Core.Formatters+{-# OPTIONS_GHC -fno-warn-deprecations #-}+-- |+-- Stability: deprecated+module Test.Hspec.Formatters+{-# DEPRECATED "Use [Test.Hspec.Api.Formatters.V1](https://hackage.haskell.org/package/hspec-api/docs/Test-Hspec-Api-Formatters-V1.html) instead." #-}+(module Test.Hspec.Core.Formatters.V1)+where+import Test.Hspec.Core.Formatters.V1
src/Test/Hspec/QuickCheck.hs view
@@ -10,6 +10,8 @@ -- * Shortcuts , prop+, xprop+, fprop ) where import Test.Hspec@@ -22,7 +24,37 @@ -- -- is a shortcut for ----- > it ".." $ property $--- > ..+-- @+-- `it` ".." $ `property` $+-- ..+-- @ prop :: (HasCallStack, Testable prop) => String -> prop -> Spec prop s = it s . property+++-- |+-- > xprop ".." $+-- > ..+--+-- is a shortcut for+--+-- @+-- `xit` ".." $ `property` $+-- ..+-- @+xprop :: (HasCallStack, Testable prop) => String -> prop -> Spec+xprop s = xit s . property+++-- |+-- > fprop ".." $+-- > ..+--+-- is a shortcut for+--+-- @+-- `fit` ".." $ `property` $+-- ..+-- @+fprop :: (HasCallStack, Testable prop) => String -> prop -> Spec+fprop s = fit s . property
version.yaml view
@@ -1,1 +1,7 @@-&version 2.9.7+version: &version 2.11.17+synopsis: A Testing Framework for Haskell+author: Simon Hengel <sol@typeful.net>+maintainer: Simon Hengel <sol@typeful.net>+category: Testing+stability: experimental+homepage: https://hspec.github.io/