hspec-meta 2.2.0 → 2.2.1
raw patch · 4 files changed
+24/−6 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Test.Hspec.Meta: class Example e where type family Arg e type instance Arg e = ()
+ Test.Hspec.Meta: class Example e where type family Arg e Arg e = ()
- Test.Hspec.Meta: it :: Example a => String -> a -> SpecWith (Arg a)
+ Test.Hspec.Meta: it :: (?loc :: CallStack, Example a) => String -> a -> SpecWith (Arg a)
Files
- hspec-core/src/Test/Hspec/Core/Formatters.hs +6/−3
- hspec-core/src/Test/Hspec/Core/Tree.hs +2/−0
- hspec-core/src/Test/Hspec/FailureReport.hs +15/−2
- hspec-meta.cabal +1/−1
hspec-core/src/Test/Hspec/Core/Formatters.hs view
@@ -191,10 +191,13 @@ writeLine (" " ++ x) where err = either (("uncaught exception: " ++) . formatException) id reason- formatLoc (Location file line _column accuracy) = " " ++ file ++ ":" ++ show line ++ ":" ++ bestEffortMarking+ formatLoc (Location file line _column accuracy) = " " ++ file ++ ":" ++ show line ++ ":" ++ message where- bestEffortMarking = case accuracy of- ExactLocation -> ""+ message = case accuracy of+ ExactLocation -> " " -- NOTE: Vim's default 'errorformat'+ -- requires a non-empty message. This is+ -- why we use a single space as message+ -- here. BestEffort -> " (best-effort)" defaultFooter :: FormatM ()
hspec-core/src/Test/Hspec/Core/Tree.hs view
@@ -17,7 +17,9 @@ ) where #ifdef HAS_SOURCE_LOCATIONS+# if !MIN_VERSION_base(4,9,0) import GHC.SrcLoc+# endif import GHC.Stack #endif
hspec-core/src/Test/Hspec/FailureReport.hs view
@@ -1,13 +1,17 @@+{-# LANGUAGE CPP #-} module Test.Hspec.FailureReport ( FailureReport (..) , writeFailureReport , readFailureReport ) where -import System.IO+#ifndef __GHCJS__ import System.SetEnv+import Test.Hspec.Core.Util (safeTry)+#endif+import System.IO import Test.Hspec.Compat-import Test.Hspec.Core.Util (Path, safeTry)+import Test.Hspec.Core.Util (Path) data FailureReport = FailureReport { failureReportSeed :: Integer@@ -18,6 +22,14 @@ } deriving (Eq, Show, Read) writeFailureReport :: FailureReport -> IO ()+#ifdef __GHCJS__+writeFailureReport _ = return ()+ -- ghcjs currently does not support setting environment variables+ -- (https://github.com/ghcjs/ghcjs/issues/263). Since writing a failure report+ -- into the environment is a non-essential feature we just disable this to be+ -- able to run hspec test-suites with ghcjs at all. Should be reverted once+ -- the issue is fixed.+#else writeFailureReport x = do -- on Windows this can throw an exception when the input is too large, hence -- we use `safeTry` here@@ -25,6 +37,7 @@ where onError err = do hPutStrLn stderr ("WARNING: Could not write environment variable HSPEC_FAILURES (" ++ show err ++ ")")+#endif readFailureReport :: IO (Maybe FailureReport) readFailureReport = do
hspec-meta.cabal view
@@ -1,5 +1,5 @@ name: hspec-meta-version: 2.2.0+version: 2.2.1 license: MIT license-file: LICENSE copyright: (c) 2011-2015 Simon Hengel,