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-03-28 11:55:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-hspec-core (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-hspec-core.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-hspec-core"

Sun Mar 28 11:55:51 2021 rev:19 rq:881536 version:2.7.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-hspec-core/ghc-hspec-core.changes    
2021-02-16 22:45:42.410363096 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-hspec-core.new.2401/ghc-hspec-core.changes  
2021-03-28 11:57:45.204297858 +0200
@@ -1,0 +2,6 @@
+Mon Mar 22 08:40:16 UTC 2021 - [email protected]
+
+- Update hspec-core to version 2.7.9.
+  Upstream does not provide a change log file.
+
+-------------------------------------------------------------------

Old:
----
  hspec-core-2.7.8.tar.gz
  hspec-core.cabal

New:
----
  hspec-core-2.7.9.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-hspec-core.spec ++++++
--- /var/tmp/diff_new_pack.b7WwGM/_old  2021-03-28 11:57:45.724298319 +0200
+++ /var/tmp/diff_new_pack.b7WwGM/_new  2021-03-28 11:57:45.728298322 +0200
@@ -19,13 +19,12 @@
 %global pkg_name hspec-core
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        2.7.8
+Version:        2.7.9
 Release:        0
 Summary:        A Testing Framework for Haskell
 License:        MIT
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-QuickCheck-devel
@@ -68,7 +67,6 @@
 
 %prep
 %autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ hspec-core-2.7.8.tar.gz -> hspec-core-2.7.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hspec-core-2.7.8/hspec-core.cabal 
new/hspec-core-2.7.9/hspec-core.cabal
--- old/hspec-core-2.7.8/hspec-core.cabal       2001-09-09 03:46:40.000000000 
+0200
+++ new/hspec-core-2.7.9/hspec-core.cabal       2001-09-09 03:46:40.000000000 
+0200
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:             hspec-core
-version:          2.7.8
+version:          2.7.9
 license:          MIT
 license-file:     LICENSE
 copyright:        (c) 2011-2021 Simon Hengel,
@@ -103,7 +103,7 @@
     , directory
     , filepath
     , hspec-expectations ==0.8.2.*
-    , hspec-meta >=2.3.2
+    , hspec-meta ==2.7.8
     , process
     , quickcheck-io >=0.2.0
     , random
@@ -155,6 +155,7 @@
       Test.Hspec.Core.ExampleSpec
       Test.Hspec.Core.FailureReportSpec
       Test.Hspec.Core.Formatters.DiffSpec
+      Test.Hspec.Core.Formatters.InternalSpec
       Test.Hspec.Core.FormattersSpec
       Test.Hspec.Core.HooksSpec
       Test.Hspec.Core.QuickCheckUtilSpec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hspec-core-2.7.8/src/Test/Hspec/Core/Formatters/Internal.hs 
new/hspec-core-2.7.9/src/Test/Hspec/Core/Formatters/Internal.hs
--- old/hspec-core-2.7.8/src/Test/Hspec/Core/Formatters/Internal.hs     
2001-09-09 03:46:40.000000000 +0200
+++ new/hspec-core-2.7.9/src/Test/Hspec/Core/Formatters/Internal.hs     
2001-09-09 03:46:40.000000000 +0200
@@ -1,4 +1,4 @@
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-}
 module Test.Hspec.Core.Formatters.Internal (
   FormatM
 , FormatConfig(..)
@@ -9,6 +9,9 @@
 , addFailMessage
 , finally_
 , formatterToFormat
+#ifdef TEST
+, overwriteWith
+#endif
 ) where
 
 import           Prelude ()
@@ -94,8 +97,8 @@
 } deriving (Eq, Show)
 
 data FormatterState = FormatterState {
-  stateSuccessCount    :: Int
-, statePendingCount    :: Int
+  stateSuccessCount    :: !Int
+, statePendingCount    :: !Int
 , stateFailMessages    :: [FailureRecord]
 , stateCpuStartTime    :: Maybe Integer
 , stateStartTime       :: Seconds
@@ -149,10 +152,18 @@
 getFailMessages :: FormatM [FailureRecord]
 getFailMessages = reverse `fmap` gets stateFailMessages
 
+overwriteWith :: String -> String -> String
+overwriteWith old new
+  | n == 0 = new
+  | otherwise = '\r' : new ++ replicate (n - length new) ' '
+  where
+    n = length old
+
 writeTransient :: String -> FormatM ()
-writeTransient s = do
-  write ("\r" ++ s)
-  modify $ \ state -> state {stateTransientOutput = s}
+writeTransient new = do
+  old <- gets stateTransientOutput
+  write $ old `overwriteWith` new
+  modify $ \ state -> state {stateTransientOutput = new}
   h <- getHandle
   liftIO $ IO.hFlush h
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hspec-core-2.7.8/test/Test/Hspec/Core/ExampleSpec.hs 
new/hspec-core-2.7.9/test/Test/Hspec/Core/ExampleSpec.hs
--- old/hspec-core-2.7.8/test/Test/Hspec/Core/ExampleSpec.hs    2001-09-09 
03:46:40.000000000 +0200
+++ new/hspec-core-2.7.9/test/Test/Hspec/Core/ExampleSpec.hs    2001-09-09 
03:46:40.000000000 +0200
@@ -13,6 +13,7 @@
   , Location(..)
 #endif
   , FailureReason(..))
+import qualified Test.Hspec.Expectations as H
 import qualified Test.Hspec.Core.Example as H
 import qualified Test.Hspec.Core.Spec as H
 import qualified Test.Hspec.Core.Runner as H
@@ -34,7 +35,7 @@
   describe "safeEvaluateExample" $ do
     context "for Expectation" $ do
       it "returns Failure if an expectation does not hold" $ do
-        Result "" (Failure _ msg) <- safeEvaluateExample (23 `shouldBe` (42 :: 
Int))
+        Result "" (Failure _ msg) <- safeEvaluateExample (23 `H.shouldBe` (42 
:: Int))
         msg `shouldBe` ExpectedButGot Nothing "42" "23"
 
       context "when used with `pending`" $ do
@@ -174,7 +175,7 @@
         let prop p = property $ \ (x :: Int) (y :: Int) -> (x == 0 && y == 1) 
==> p
         context "when used with shouldBe" $ do
           it "shows what falsified it" $ do
-            Result "" (Failure _ err) <- evaluateExample $ prop $ 23 
`shouldBe` (42 :: Int)
+            Result "" (Failure _ err) <- evaluateExample $ prop $ 23 
`H.shouldBe` (42 :: Int)
             err `shouldBe` ExpectedButGot (Just "Falsifiable (after 1 test):\n 
 0\n  1") "42" "23"
 
         context "when used with assertEqual" $ do
@@ -189,7 +190,7 @@
 
         context "when used with verbose" $ do
           it "includes verbose output" $ do
-            Result info (Failure _ err) <- evaluateExample $ verbose $ 
(`shouldBe` (23 :: Int))
+            Result info (Failure _ err) <- evaluateExample $ verbose $ 
(`H.shouldBe` (23 :: Int))
             info `shouldBe` "Failed:\n0"
             err `shouldBe` ExpectedButGot (Just "Falsifiable (after 1 test):\n 
 0") "23" "0"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hspec-core-2.7.8/test/Test/Hspec/Core/Formatters/InternalSpec.hs 
new/hspec-core-2.7.9/test/Test/Hspec/Core/Formatters/InternalSpec.hs
--- old/hspec-core-2.7.8/test/Test/Hspec/Core/Formatters/InternalSpec.hs        
1970-01-01 01:00:00.000000000 +0100
+++ new/hspec-core-2.7.9/test/Test/Hspec/Core/Formatters/InternalSpec.hs        
2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,26 @@
+module Test.Hspec.Core.Formatters.InternalSpec (spec) where
+
+import           Prelude ()
+import           Helper
+
+
+import           Test.Hspec.Core.Formatters.Internal
+
+spec :: Spec
+spec = do
+  describe "overwriteWith" $ do
+    context "when old is null" $ do
+      it "returns new" $ do
+        ("" `overwriteWith` "foo") `shouldBe` "foo"
+
+    context "when old and new have the same length" $ do
+      it "overwrites old" $ do
+        ("foo" `overwriteWith` "bar") `shouldBe` "\rbar"
+
+    context "when old is shorter than new" $ do
+      it "overwrites old" $ do
+        ("ba" `overwriteWith` "foo") `shouldBe` "\rfoo"
+
+    context "when old is longer than new" $ do
+      it "overwrites old" $ do
+        ("foobar" `overwriteWith` "foo") `shouldBe` "\rfoo   "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hspec-core-2.7.8/test/Test/Hspec/Core/RunnerSpec.hs 
new/hspec-core-2.7.9/test/Test/Hspec/Core/RunnerSpec.hs
--- old/hspec-core-2.7.8/test/Test/Hspec/Core/RunnerSpec.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/hspec-core-2.7.9/test/Test/Hspec/Core/RunnerSpec.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -23,6 +23,7 @@
 import           System.Console.ANSI
 
 import           Test.Hspec.Core.FailureReport (FailureReport(..))
+import qualified Test.Hspec.Expectations as H
 import qualified Test.Hspec.Core.Spec as H
 import qualified Test.Hspec.Core.Runner as H
 import qualified Test.Hspec.Core.Formatters as H (silent)
@@ -425,7 +426,7 @@
       it "shows colorized diffs" $ do
         r <- capture_ . ignoreExitCode . withArgs ["--diff", "--color"] . 
H.hspec $ do
           H.it "foo" $ do
-            23 `shouldBe` (42 :: Int)
+            23 `H.shouldBe` (42 :: Int)
         r `shouldContain` unlines [
             red ++ "       expected: " ++ reset ++ red ++ "42" ++ reset
           , red ++ "        but got: " ++ reset ++ green ++ "23" ++ reset
@@ -435,7 +436,7 @@
       it "it does not show colorized diffs" $ do
         r <- capture_ . ignoreExitCode . withArgs ["--no-diff", "--color"] . 
H.hspec $ do
           H.it "foo" $ do
-            23 `shouldBe` (42 :: Int)
+            23 `H.shouldBe` (42 :: Int)
         r `shouldContain` unlines [
             red ++ "       expected: " ++ reset ++ "42"
           , red ++ "        but got: " ++ reset ++ "23"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hspec-core-2.7.8/version.yaml 
new/hspec-core-2.7.9/version.yaml
--- old/hspec-core-2.7.8/version.yaml   2001-09-09 03:46:40.000000000 +0200
+++ new/hspec-core-2.7.9/version.yaml   2001-09-09 03:46:40.000000000 +0200
@@ -1 +1 @@
-&version 2.7.8
+&version 2.7.9

Reply via email to