packages feed

sandwich 0.1.3.1 → 0.1.3.2

raw patch · 4 files changed

+14/−5 lines, 4 files

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for sandwich +## 0.1.3.2++* Prevent spurious messages in IOExceptions from withFile+ ## 0.1.3.1  * Fix #61 (options not being passed from configured TUI formatter when `--tui` flag is used)
sandwich.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           sandwich-version:        0.1.3.1+version:        0.1.3.2 synopsis:       Yet another test framework for Haskell description:    Please see the <https://codedownio.github.io/sandwich documentation>. category:       Testing
src/Test/Sandwich.hs view
@@ -152,9 +152,11 @@          runWithRepeat repeatCount totalTests $            case optIndividualTestModule clo of              Nothing -> runSandwich' (Just $ clo { optUserOptions = () }) options $-               introduce' (defaultNodeOptions { nodeOptionsVisibilityThreshold = systemVisibilityThreshold }) "command line options" commandLineOptions (pure clo) (const $ return ()) spec+               introduce' (defaultNodeOptions { nodeOptionsVisibilityThreshold = systemVisibilityThreshold+                                              , nodeOptionsCreateFolder = False }) "command line options" commandLineOptions (pure clo) (const $ return ()) spec              Just (IndividualTestModuleName x) -> runSandwich' (Just $ clo { optUserOptions = () }) options $ filterTreeToModule x $-               introduce' (defaultNodeOptions { nodeOptionsVisibilityThreshold = systemVisibilityThreshold }) "command line options" commandLineOptions (pure clo) (const $ return ()) spec+               introduce' (defaultNodeOptions { nodeOptionsVisibilityThreshold = systemVisibilityThreshold+                                              , nodeOptionsCreateFolder = False }) "command line options" commandLineOptions (pure clo) (const $ return ()) spec              Just (IndividualTestMainFn x) -> do                let individualTestFlagStrings = [[ Just ("--" <> shorthand), const ("--" <> shorthand <> "-main") <$> nodeModuleInfoFn ]                                                | (NodeModuleInfo {..}, shorthand) <- modulesAndShorthands]
src/Test/Sandwich/Interpreters/StartTree.hs view
@@ -284,8 +284,11 @@   maybeTestDirectory <- getTestDirectory ctx   let options = baseContextOptions $ getBaseContext ctx -  handleAny (wrapInFailureReasonIfNecessary exceptionMessage) $-    withLogFn maybeTestDirectory options $ \logFn ->+  -- We want our handleAny call to be *inside* the withLogFn call, because+  -- withFile will catch IOException and fill in its own information, making the+  -- resulting error confusing+  withLogFn maybeTestDirectory options $ \logFn ->+    handleAny (wrapInFailureReasonIfNecessary exceptionMessage)       (Right <$> (runLoggingT (runReaderT (unExampleT ex) ctx) logFn))    where