sydtest 0.11.0.1 → 0.11.0.2
raw patch · 4 files changed
+19/−4 lines, 4 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Test.Syd: shouldMatchList :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation
+ Test.Syd.Expectation: shouldMatchList :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation
Files
- CHANGELOG.md +7/−0
- src/Test/Syd.hs +1/−0
- src/Test/Syd/Expectation.hs +7/−0
- sydtest.cabal +4/−4
CHANGELOG.md view
@@ -1,5 +1,12 @@ # Changelog +## [0.11.0.2] - 2022-09-7++### Changed++* Added the `shouldMatchList` expectation, corresponding the one from+ `hspec-expectations`.+ ## [0.11.0.1] - 2022-06-28 ### Changed
src/Test/Syd.hs view
@@ -99,6 +99,7 @@ shouldStartWith, shouldEndWith, shouldContain,+ shouldMatchList, expectationFailure, context, Expectation,
src/Test/Syd/Expectation.hs view
@@ -83,6 +83,13 @@ infix 1 `shouldContain` +-- | Assert that the given list contains all elements from the other+-- given list and only them, perhaps in a different order.+shouldMatchList :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation+shouldMatchList a b = shouldSatisfyNamed a ("matches list\n" <> ppShow b) (matches b)+ where+ matches x y = null (x \\ y) && null (y \\ x)+ -- | Assert that two 'String's are equal according to `==`. -- -- Note that using function could mess up the colours in your terminal if the Texts contain ANSI codes.
sydtest.cabal view
@@ -1,11 +1,11 @@ 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.35.0. -- -- see: https://github.com/sol/hpack name: sydtest-version: 0.11.0.1+version: 0.11.0.2 synopsis: A modern testing framework for Haskell with good defaults and advanced testing features. description: A modern testing framework for Haskell with good defaults and advanced testing features. Sydtest aims to make the common easy and the hard possible. See https://github.com/NorfairKing/sydtest#readme for more information. category: Testing@@ -86,13 +86,13 @@ , split , stm , text+ default-language: Haskell2010 if os(windows) build-depends: ansi-terminal else build-depends: safe-coloured-text-terminfo- default-language: Haskell2010 test-suite sydtest-output-test type: exitcode-stdio-1.0@@ -112,10 +112,10 @@ , safe-coloured-text , sydtest , text+ default-language: Haskell2010 if !os(windows) build-depends: safe-coloured-text-terminfo- default-language: Haskell2010 test-suite sydtest-test type: exitcode-stdio-1.0