Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-tasty for openSUSE:Factory 
checked in at 2025-01-27 20:51:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-tasty (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-tasty.new.2316 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-tasty"

Mon Jan 27 20:51:38 2025 rev:14 rq:1239828 version:1.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-tasty/ghc-tasty.changes      2024-12-20 
23:11:54.075640850 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-tasty.new.2316/ghc-tasty.changes    
2025-01-27 20:51:49.378145142 +0100
@@ -1,0 +2,14 @@
+Sun Jan  5 19:52:20 UTC 2025 - Peter Simons <psim...@suse.com>
+
+- Update tasty to version 1.5.3.
+  Version 1.5.3
+  --------------
+
+  _2025-01-05_
+
+  * Console reporter: disable line wrapping
+    ([#433](https://github.com/UnkindPartition/tasty/pull/433)).
+  * Console reporter: force flushing of stdout after `showCursor`
+    ([#436](https://github.com/UnkindPartition/tasty/pull/436)).
+
+-------------------------------------------------------------------

Old:
----
  tasty-1.5.2.tar.gz

New:
----
  tasty-1.5.3.tar.gz

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

Other differences:
------------------
++++++ ghc-tasty.spec ++++++
--- /var/tmp/diff_new_pack.psH1Mt/_old  2025-01-27 20:51:51.574235805 +0100
+++ /var/tmp/diff_new_pack.psH1Mt/_new  2025-01-27 20:51:51.574235805 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-tasty
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name tasty
 %global pkgver %{pkg_name}-%{version}
 Name:           ghc-%{pkg_name}
-Version:        1.5.2
+Version:        1.5.3
 Release:        0
 Summary:        Modern and extensible testing framework
 License:        MIT

++++++ tasty-1.5.2.tar.gz -> tasty-1.5.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-1.5.2/CHANGELOG.md new/tasty-1.5.3/CHANGELOG.md
--- old/tasty-1.5.2/CHANGELOG.md        2001-09-09 03:46:40.000000000 +0200
+++ new/tasty-1.5.3/CHANGELOG.md        2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,16 @@
 Changes
 =======
 
+Version 1.5.3
+--------------
+
+_2025-01-05_
+
+* Console reporter: disable line wrapping
+  ([#433](https://github.com/UnkindPartition/tasty/pull/433)).
+* Console reporter: force flushing of stdout after `showCursor`
+  ([#436](https://github.com/UnkindPartition/tasty/pull/436)).
+
 Version 1.5.2
 --------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tasty-1.5.2/Test/Tasty/Ingredients/ConsoleReporter.hs 
new/tasty-1.5.3/Test/Tasty/Ingredients/ConsoleReporter.hs
--- old/tasty-1.5.2/Test/Tasty/Ingredients/ConsoleReporter.hs   2001-09-09 
03:46:40.000000000 +0200
+++ new/tasty-1.5.3/Test/Tasty/Ingredients/ConsoleReporter.hs   2001-09-09 
03:46:40.000000000 +0200
@@ -135,7 +135,6 @@
     !alignment = computeAlignment opts tree
 
     MinDurationToReport{minDurationMicros} = lookupOption opts
-    AnsiTricks{getAnsiTricks} = lookupOption opts
 
     runSingleTest
       :: (IsTest t, ?colors :: Bool)
@@ -153,7 +152,7 @@
           (replicate postNamePadding ' ')
 
         printTestName = do
-          putStr testNamePadded
+          withoutLineWrap $ putStr testNamePadded
           hFlush stdout
 
         printTestProgress progress
@@ -173,8 +172,9 @@
               -- A new progress message may be shorter than the previous one
               -- so we must clean whole line and print anew.
               clearLine
-              putStr testNamePadded
-              infoOk msg
+              withoutLineWrap $ do
+                putStr testNamePadded
+                infoOk msg
               hFlush stdout
 
         printTestResult result = do
@@ -189,10 +189,11 @@
                 _ -> fail
             time = resultTime result
 
-          when getAnsiTricks $ do
-            putChar '\r'
-            clearLine
-            putStr testNamePadded
+          withoutLineWrap $ do
+            when getAnsiTricks $ do
+              putChar '\r'
+              clearLine
+              putStr testNamePadded
 
           printFn (resultShortDescription result)
           when (floor (time * 1e6) >= minDurationMicros) $
@@ -211,7 +212,7 @@
     runGroup _opts name grp = Ap $ do
       level <- ask
       let
-        printHeading = printf "%s%s\n" (indent level) name
+        printHeading = withoutLineWrap $ printf "%s%s\n" (indent level) name
         printBody = runReader (getApp (mconcat grp)) (level + 1)
       return $ PrintHeading name printHeading printBody
 
@@ -223,6 +224,18 @@
           , foldGroup = runGroup
           }
           opts tree
+  where
+    AnsiTricks{getAnsiTricks} = lookupOption opts
+    -- We must ensure these lines don't wrap, otherwise the wrong
+    -- line will be cleared later or the test tree printing will
+    -- itself wrap.
+    withoutLineWrap :: IO () -> IO ()
+#if MIN_VERSION_ansi_terminal(1,1,2)
+    withoutLineWrap m | getAnsiTricks =
+      bracket_ disableLineWrap enableLineWrap m
+#endif
+    withoutLineWrap m = m
+
 
 -- | Make sure the progress text does not contain any newlines or line feeds,
 -- lest our ANSI magic breaks. Since the progress text is expected to be short,
@@ -550,7 +563,9 @@
       isTermColor <- hSupportsANSIColor stdout
 
       (\k -> if isTerm
-        then (do hideCursor; k) `finally` showCursor
+        -- When killing with Ctrl+C 'showCursor' can fail
+        -- to restore terminal cursor if not flushed explicitly
+        then (do hideCursor; k) `finally` (do showCursor; hFlush stdout)
         else k) $ do
 
           hSetBuffering stdout LineBuffering
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-1.5.2/tasty.cabal new/tasty-1.5.3/tasty.cabal
--- old/tasty-1.5.2/tasty.cabal 2001-09-09 03:46:40.000000000 +0200
+++ new/tasty-1.5.3/tasty.cabal 2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:       >=1.10
 name:                tasty
-version:             1.5.2
+version:             1.5.3
 synopsis:            Modern and extensible testing framework
 description:         Tasty is a modern testing framework for Haskell.
                      It lets you combine your unit tests, golden

Reply via email to