Hello community,

here is the log from the commit of package ghc-tasty for openSUSE:Factory 
checked in at 2017-03-14 10:06:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-tasty (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-tasty.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-tasty"

Tue Mar 14 10:06:01 2017 rev:5 rq:461685 version:0.11.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-tasty/ghc-tasty.changes      2017-02-11 
01:42:15.815862896 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-tasty.new/ghc-tasty.changes 2017-03-14 
10:06:02.216710786 +0100
@@ -1,0 +2,5 @@
+Mon Feb 20 08:42:30 UTC 2017 - [email protected]
+
+- Update to version 0.11.2 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  tasty-0.11.1.tar.gz

New:
----
  tasty-0.11.2.tar.gz

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

Other differences:
------------------
++++++ ghc-tasty.spec ++++++
--- /var/tmp/diff_new_pack.WdzORF/_old  2017-03-14 10:06:02.920611115 +0100
+++ /var/tmp/diff_new_pack.WdzORF/_new  2017-03-14 10:06:02.920611115 +0100
@@ -18,7 +18,7 @@
 
 %global pkg_name tasty
 Name:           ghc-%{pkg_name}
-Version:        0.11.1
+Version:        0.11.2
 Release:        0
 Summary:        Modern and extensible testing framework
 License:        MIT

++++++ tasty-0.11.1.tar.gz -> tasty-0.11.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.1/CHANGELOG.md 
new/tasty-0.11.2/CHANGELOG.md
--- old/tasty-0.11.1/CHANGELOG.md       2017-01-18 12:51:23.000000000 +0100
+++ new/tasty-0.11.2/CHANGELOG.md       2017-02-13 10:44:23.000000000 +0100
@@ -1,6 +1,11 @@
 Changes
 =======
 
+Version 0.11.2
+--------------
+
+Add `composeReporters`, a function to run multiple reporter ingredients
+
 Version 0.11.1
 --------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.1/Test/Tasty/Ingredients.hs 
new/tasty-0.11.2/Test/Tasty/Ingredients.hs
--- old/tasty-0.11.1/Test/Tasty/Ingredients.hs  2015-04-30 20:38:39.000000000 
+0200
+++ new/tasty-0.11.2/Test/Tasty/Ingredients.hs  2017-02-13 10:41:53.000000000 
+0100
@@ -8,6 +8,7 @@
   , ingredientOptions
   , ingredientsOptions
   , suiteOptions
+  , composeReporters
   ) where
 
 import Control.Monad
@@ -18,6 +19,7 @@
 import Test.Tasty.Run
 import Test.Tasty.Options
 import Test.Tasty.Options.Core
+import Control.Concurrent.Async (concurrently)
 
 -- | 'Ingredient's make your test suite tasty.
 --
@@ -119,3 +121,21 @@
   coreOptions ++
   ingredientsOptions ins ++
   treeOptions tree
+
+-- | Compose two 'TestReporter' ingredients which are then executed
+-- in parallel. This can be useful if you want to have two reporters
+-- active at the same time, e.g., one which prints to the console and
+-- one which writes the test results to a file.
+--
+-- Be aware that it is not possible to use 'composeReporters' with a 
'TestManager',
+-- it only works for 'TestReporter' ingredients.
+composeReporters :: Ingredient -> Ingredient -> Ingredient
+composeReporters (TestReporter o1 f1) (TestReporter o2 f2) =
+  TestReporter (o1 ++ o2) $ \o t ->
+  case (f1 o t, f2 o t) of
+    (g, Nothing) -> g
+    (Nothing, g) -> g
+    (Just g1, Just g2) -> Just $ \s -> do
+      (h1, h2) <- concurrently (g1 s) (g2 s)
+      return $ \x -> fmap (uncurry (&&)) $ concurrently (h1 x) (h2 x)
+composeReporters _ _ = error "Only TestReporters can be composed"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.1/tasty.cabal new/tasty-0.11.2/tasty.cabal
--- old/tasty-0.11.1/tasty.cabal        2017-01-18 12:52:07.000000000 +0100
+++ new/tasty-0.11.2/tasty.cabal        2017-02-13 10:44:26.000000000 +0100
@@ -2,7 +2,7 @@
 --  see http://haskell.org/cabal/users-guide/
 
 name:                tasty
-version:             0.11.1
+version:             0.11.2
 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