Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-hspec-core for openSUSE:Factory checked in at 2021-04-24 23:08:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-hspec-core (Old) and /work/SRC/openSUSE:Factory/.ghc-hspec-core.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hspec-core" Sat Apr 24 23:08:58 2021 rev:20 rq:888035 version:2.7.10 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-hspec-core/ghc-hspec-core.changes 2021-03-28 11:57:45.204297858 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-hspec-core.new.12324/ghc-hspec-core.changes 2021-04-24 23:10:09.443480013 +0200 @@ -1,0 +2,6 @@ +Thu Apr 15 10:27:55 UTC 2021 - [email protected] + +- Update hspec-core to version 2.7.10. + Upstream does not provide a change log file. + +------------------------------------------------------------------- Old: ---- hspec-core-2.7.9.tar.gz New: ---- hspec-core-2.7.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-hspec-core.spec ++++++ --- /var/tmp/diff_new_pack.zepucq/_old 2021-04-24 23:10:09.903480664 +0200 +++ /var/tmp/diff_new_pack.zepucq/_new 2021-04-24 23:10:09.907480670 +0200 @@ -19,7 +19,7 @@ %global pkg_name hspec-core %bcond_with tests Name: ghc-%{pkg_name} -Version: 2.7.9 +Version: 2.7.10 Release: 0 Summary: A Testing Framework for Haskell License: MIT ++++++ hspec-core-2.7.9.tar.gz -> hspec-core-2.7.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/hspec-core.cabal new/hspec-core-2.7.10/hspec-core.cabal --- old/hspec-core-2.7.9/hspec-core.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/hspec-core.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.3. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: hspec-core -version: 2.7.9 +version: 2.7.10 license: MIT license-file: LICENSE copyright: (c) 2011-2021 Simon Hengel, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/src/Test/Hspec/Core/Config/Options.hs new/hspec-core-2.7.10/src/Test/Hspec/Core/Config/Options.hs --- old/hspec-core-2.7.9/src/Test/Hspec/Core/Config/Options.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/src/Test/Hspec/Core/Config/Options.hs 2001-09-09 03:46:40.000000000 +0200 @@ -159,7 +159,8 @@ where formatters :: [(String, Formatter)] formatters = [ - ("specdoc", specdoc) + ("checks", checks) + , ("specdoc", specdoc) , ("progress", progress) , ("failed-examples", failed_examples) , ("silent", silent) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/src/Test/Hspec/Core/Format.hs new/hspec-core-2.7.10/src/Test/Hspec/Core/Format.hs --- old/hspec-core-2.7.9/src/Test/Hspec/Core/Format.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/src/Test/Hspec/Core/Format.hs 2001-09-09 03:46:40.000000000 +0200 @@ -33,5 +33,6 @@ , formatGroupStarted :: Path -> m () , formatGroupDone :: Path -> m () , formatProgress :: Path -> Progress -> m () -, formatItem :: Path -> Item -> m () +, formatItemStarted :: Path -> m () +, formatItemDone :: Path -> Item -> m () } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/src/Test/Hspec/Core/Formatters/Internal.hs new/hspec-core-2.7.10/src/Test/Hspec/Core/Formatters/Internal.hs --- old/hspec-core-2.7.9/src/Test/Hspec/Core/Formatters/Internal.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/src/Test/Hspec/Core/Formatters/Internal.hs 2001-09-09 03:46:40.000000000 +0200 @@ -40,9 +40,14 @@ return a , formatGroupStarted = \ (nesting, name) -> interpret $ M.exampleGroupStarted formatter nesting name , formatGroupDone = \ _ -> interpret (M.exampleGroupDone formatter) -, formatProgress = \ path progress -> when useColor $ do + +, formatProgress = \ path progress -> do interpret $ M.exampleProgress formatter path progress -, formatItem = \ path (Item loc _duration info result) -> do + +, formatItemStarted = \ path -> do + interpret $ M.exampleStarted formatter path + +, formatItemDone = \ path (Item loc _duration info result) -> do clearTransientOutput case result of Success -> do @@ -54,8 +59,7 @@ Failure err -> do addFailMessage loc path err interpret $ M.exampleFailed formatter path info err -} where - useColor = formatConfigUseColor config +} interpret :: M.FormatM a -> FormatM a interpret = interpretWith Environment { @@ -161,11 +165,13 @@ writeTransient :: String -> FormatM () writeTransient new = do - old <- gets stateTransientOutput - write $ old `overwriteWith` new - modify $ \ state -> state {stateTransientOutput = new} - h <- getHandle - liftIO $ IO.hFlush h + useColor <- getConfig formatConfigUseColor + when (useColor) $ do + old <- gets stateTransientOutput + write $ old `overwriteWith` new + modify $ \ state -> state {stateTransientOutput = new} + h <- getHandle + liftIO $ IO.hFlush h clearTransientOutput :: FormatM () clearTransientOutput = do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/src/Test/Hspec/Core/Formatters/Monad.hs new/hspec-core-2.7.10/src/Test/Hspec/Core/Formatters/Monad.hs --- old/hspec-core-2.7.9/src/Test/Hspec/Core/Formatters/Monad.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/src/Test/Hspec/Core/Formatters/Monad.hs 2001-09-09 03:46:40.000000000 +0200 @@ -56,11 +56,13 @@ -- | evaluated before each test group , exampleGroupStarted :: [String] -> String -> FormatM () +-- | evaluated after each test group , exampleGroupDone :: FormatM () +-- | evaluated before each example +, exampleStarted :: Path -> FormatM () + -- | used to notify the progress of the currently evaluated example --- --- /Note/: This is only called when interactive/color mode. , exampleProgress :: Path -> Progress -> FormatM () -- | evaluated after each successful example diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/src/Test/Hspec/Core/Formatters.hs new/hspec-core-2.7.10/src/Test/Hspec/Core/Formatters.hs --- old/hspec-core-2.7.9/src/Test/Hspec/Core/Formatters.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/src/Test/Hspec/Core/Formatters.hs 2001-09-09 03:46:40.000000000 +0200 @@ -8,6 +8,7 @@ -- * Formatters silent +, checks , specdoc , progress , failed_examples @@ -110,6 +111,7 @@ headerFormatter = return () , exampleGroupStarted = \_ _ -> return () , exampleGroupDone = return () +, exampleStarted = \_ -> return () , exampleProgress = \_ _ -> return () , exampleSucceeded = \ _ _ -> return () , exampleFailed = \_ _ _ -> return () @@ -118,6 +120,40 @@ , footerFormatter = return () } +checks :: Formatter +checks = specdoc { + exampleStarted = \(nesting, requirement) -> do + writeTransient $ indentationFor nesting ++ requirement ++ " [ ]" + +, exampleProgress = \(nesting, requirement) p -> do + writeTransient $ indentationFor nesting ++ requirement ++ " [" ++ (formatProgress p) ++ "]" + +, exampleSucceeded = \(nesting, requirement) info -> do + writeResult nesting requirement info $ withSuccessColor $ write "???" + +, exampleFailed = \(nesting, requirement) info _ -> do + writeResult nesting requirement info $ withFailColor $ write "???" + +, examplePending = \(nesting, requirement) info reason -> do + writeResult nesting requirement info $ withPendingColor $ write "???" + + withPendingColor $ do + writeLine $ indentationFor ("" : nesting) ++ "# PENDING: " ++ fromMaybe "No reason given" reason +} where + indentationFor nesting = replicate (length nesting * 2) ' ' + + writeResult :: [String] -> String -> String -> FormatM () -> FormatM () + writeResult nesting requirement info action = do + write $ indentationFor nesting ++ requirement ++ " [" + action + writeLine "]" + forM_ (lines info) $ \ s -> + writeLine $ indentationFor ("" : nesting) ++ s + + formatProgress (current, total) + | total == 0 = show current + | otherwise = show current ++ "/" ++ show total + specdoc :: Formatter specdoc = silent { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/src/Test/Hspec/Core/Runner/Eval.hs new/hspec-core-2.7.10/src/Test/Hspec/Core/Runner/Eval.hs --- old/hspec-core-2.7.9/src/Test/Hspec/Core/Runner/Eval.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/src/Test/Hspec/Core/Runner/Eval.hs 2001-09-09 03:46:40.000000000 +0200 @@ -66,10 +66,20 @@ getFormat :: Monad m => (Format m -> a) -> EvalM m a getFormat format = gets (format . evalConfigFormat . stateConfig) -reportItem :: Monad m => Path -> Format.Item -> EvalM m () -reportItem path item = do +reportItem :: Monad m => Path -> Maybe Location -> EvalM m (Seconds, Result) -> EvalM m () +reportItem path loc action = do + reportItemStarted path + action >>= reportResult path loc + +reportItemStarted :: Monad m => Path -> EvalM m () +reportItemStarted path = do + format <- getFormat formatItemStarted + lift (format path) + +reportItemDone :: Monad m => Path -> Format.Item -> EvalM m () +reportItemDone path item = do addResult path item - format <- getFormat formatItem + format <- getFormat formatItemDone lift (format path item) failureItem :: Maybe Location -> Seconds -> String -> FailureReason -> Format.Item @@ -79,10 +89,10 @@ reportResult path loc (duration, result) = do case result of Result info status -> case status of - Success -> reportItem path (Format.Item loc duration info Format.Success) - Pending loc_ reason -> reportItem path (Format.Item (loc_ <|> loc) duration info $ Format.Pending reason) - Failure loc_ err@(Error _ e) -> reportItem path (failureItem (loc_ <|> extractLocation e <|> loc) duration info err) - Failure loc_ err -> reportItem path (failureItem (loc_ <|> loc) duration info err) + Success -> reportItemDone path (Format.Item loc duration info Format.Success) + Pending loc_ reason -> reportItemDone path (Format.Item (loc_ <|> loc) duration info $ Format.Pending reason) + Failure loc_ err@(Error _ e) -> reportItemDone path (failureItem (loc_ <|> extractLocation e <|> loc) duration info err) + Failure loc_ err -> reportItemDone path (failureItem (loc_ <|> loc) duration info err) groupStarted :: Monad m => Path -> EvalM m () groupStarted path = do @@ -214,13 +224,13 @@ r <- liftIO $ measure $ safeEvaluate (action >> return (Result "" Success)) case r of (_, Result "" Success) -> return () - _ -> reportResult path Nothing r + _ -> reportItem path Nothing (return r) where path = (groups, "afterAll-hook") evalItem :: [String] -> RunningItem m -> EvalM m () evalItem groups (Item requirement loc action) = do - lift (action path) >>= reportResult path loc + reportItem path loc $ lift (action path) where path :: Path path = (groups, requirement) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/test/Test/Hspec/Core/HooksSpec.hs new/hspec-core-2.7.10/test/Test/Hspec/Core/HooksSpec.hs --- old/hspec-core-2.7.9/test/Test/Hspec/Core/HooksSpec.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/test/Test/Hspec/Core/HooksSpec.hs 2001-09-09 03:46:40.000000000 +0200 @@ -30,7 +30,8 @@ , formatGroupStarted = \ _ -> return () , formatGroupDone = \ _ -> return () , formatProgress = \ _ _ -> return () - , formatItem = \ _ _ -> return () + , formatItemStarted = \ _ -> return () + , formatItemDone = \ _ _ -> return () } normalize = map $ \ (path, item) -> (pathToList path, normalizeItem item) normalizeItem item = item {itemLocation = Nothing, itemDuration = 0} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-core-2.7.9/version.yaml new/hspec-core-2.7.10/version.yaml --- old/hspec-core-2.7.9/version.yaml 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-core-2.7.10/version.yaml 2001-09-09 03:46:40.000000000 +0200 @@ -1 +1 @@ -&version 2.7.9 +&version 2.7.10
