Hello community,

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

Package is "ghc-tasty-silver"

Wed Mar  8 01:12:42 2017 rev:2 rq:461686 version:3.1.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-tasty-silver/ghc-tasty-silver.changes        
2016-11-16 13:32:40.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-tasty-silver.new/ghc-tasty-silver.changes   
2017-03-08 01:12:43.249324514 +0100
@@ -1,0 +2,5 @@
+Thu Sep 15 06:40:34 UTC 2016 - psim...@suse.com
+
+- Update to version 3.1.9 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  tasty-silver-3.1.8.1.tar.gz

New:
----
  tasty-silver-3.1.9.tar.gz

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

Other differences:
------------------
++++++ ghc-tasty-silver.spec ++++++
--- /var/tmp/diff_new_pack.MY3Q3M/_old  2017-03-08 01:12:43.977221508 +0100
+++ /var/tmp/diff_new_pack.MY3Q3M/_new  2017-03-08 01:12:43.977221508 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-tasty-silver
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,15 +19,14 @@
 %global pkg_name tasty-silver
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        3.1.8.1
+Version:        3.1.9
 Release:        0
 Summary:        A fancy test runner, including support for golden tests
 License:        MIT
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-ansi-terminal-devel
 BuildRequires:  ghc-async-devel
 BuildRequires:  ghc-bytestring-devel
@@ -51,7 +50,6 @@
 BuildRequires:  ghc-tasty-hunit-devel
 BuildRequires:  ghc-transformers-devel
 %endif
-# End cabal-rpm deps
 
 %description
 This package provides a fancy test runner and support for «golden testing».
@@ -75,20 +73,14 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
 
 %post devel
 %ghc_pkg_recache

++++++ tasty-silver-3.1.8.1.tar.gz -> tasty-silver-3.1.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-silver-3.1.8.1/CHANGELOG.md 
new/tasty-silver-3.1.9/CHANGELOG.md
--- old/tasty-silver-3.1.8.1/CHANGELOG.md       2015-05-14 21:34:07.000000000 
+0200
+++ new/tasty-silver-3.1.9/CHANGELOG.md 2016-08-29 21:47:54.000000000 +0200
@@ -1,6 +1,22 @@
 Changes
 =======
 
+Version 3.1.9
+-------------
+
+* Fix compilation with optparse-applicative 0.13.*.
+* Provide character-level diff if wdiff and colordiff are available.
+
+Version 3.1.8.1
+---------------
+
+* Fix compilation with GHC 8.
+
+Version 3.1.8
+-------------
+
+* Make update function optional for test cases.
+
 Version 3.1.7
 -------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tasty-silver-3.1.8.1/Test/Tasty/Silver/Interactive.hs 
new/tasty-silver-3.1.9/Test/Tasty/Silver/Interactive.hs
--- old/tasty-silver-3.1.8.1/Test/Tasty/Silver/Interactive.hs   2016-01-19 
23:11:14.000000000 +0100
+++ new/tasty-silver-3.1.9/Test/Tasty/Silver/Interactive.hs     2016-08-29 
21:47:54.000000000 +0200
@@ -56,6 +56,7 @@
 import System.Process.ByteString as PS
 import System.Process
 import qualified Data.ByteString as BS
+import System.Directory
 import System.IO
 import System.IO.Temp
 import System.FilePath
@@ -179,27 +180,36 @@
 
 
 printDiff :: TestName -> GDiff -> IO ()
-printDiff n (DiffText _ tGold tAct) = withDiffEnv
+printDiff n (DiffText _ tGold tAct) = withDiffEnv n tGold tAct
   (\fGold fAct -> do
         (_, stdOut, _) <- PTL.readProcessWithExitCode "sh" ["-c", "git diff 
--no-index --text " ++ fGold ++ " " ++ fAct] T.empty
         TIO.putStrLn stdOut
 
   )
-  n tGold tAct
 printDiff _ (ShowDiffed _ t) = TIO.putStrLn t
 printDiff _ Equal = error "Can't print diff for equal values."
 
 showDiff :: TestName -> GDiff -> IO ()
-showDiff n (DiffText _ tGold tAct) = withDiffEnv
-  (\fGold fAct -> callProcess "sh"
-        ["-c", "git diff --color=always --no-index --text " ++ fGold ++ " " ++ 
fAct ++ " | less -r > /dev/tty"])
-  n tGold tAct
+showDiff n (DiffText _ tGold tAct) = do
+  hasColorDiff' <- hasColorDiff
+
+  withDiffEnv n tGold tAct
+    (if hasColorDiff' then colorDiff else gitDiff)
+  where
+    gitDiff fGold fAct = callProcess "sh"
+        ["-c", "git diff --color=always --no-index --text " ++ fGold ++ " " ++ 
fAct ++ " | less -r > /dev/tty"]
+
+    doesCmdExist cmd = isJust <$> findExecutable cmd
+
+    hasColorDiff = (&&) <$> doesCmdExist "wdiff" <*> doesCmdExist "colordiff"
+
+    colorDiff fGold fAct = callProcess "sh" ["-c", "wdiff " ++ fGold ++ " " ++ 
fAct ++ " | colordiff | less -r > /dev/tty"]
 showDiff n (ShowDiffed _ t) = showInLess n t
 showDiff _ Equal = error "Can't show diff for equal values."
 
 -- Stores the golden/actual text in two files, so we can use it for git diff.
-withDiffEnv :: (FilePath -> FilePath -> IO ()) -> TestName -> T.Text -> T.Text 
-> IO ()
-withDiffEnv cont n tGold tAct = do
+withDiffEnv :: TestName -> T.Text -> T.Text -> (FilePath -> FilePath -> IO ()) 
-> IO ()
+withDiffEnv n tGold tAct cont = do
   withSystemTempFile (n <.> "golden") (\fGold hGold -> do
     withSystemTempFile (n <.> "actual") (\fAct hAct -> do
       hSetBinaryMode hGold True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-silver-3.1.8.1/Test/Tasty/Silver/Internal.hs 
new/tasty-silver-3.1.9/Test/Tasty/Silver/Internal.hs
--- old/tasty-silver-3.1.8.1/Test/Tasty/Silver/Internal.hs      2016-01-19 
23:10:34.000000000 +0100
+++ new/tasty-silver-3.1.9/Test/Tasty/Silver/Internal.hs        2016-08-29 
21:47:54.000000000 +0200
@@ -13,6 +13,7 @@
 import System.IO.Error
 import qualified Data.Text as T
 import Options.Applicative
+import Data.Monoid
 import Data.Tagged
 import Data.Proxy
 import Data.Maybe
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-silver-3.1.8.1/tasty-silver.cabal 
new/tasty-silver-3.1.9/tasty-silver.cabal
--- old/tasty-silver-3.1.8.1/tasty-silver.cabal 2016-01-19 23:28:07.000000000 
+0100
+++ new/tasty-silver-3.1.9/tasty-silver.cabal   2016-08-29 21:47:54.000000000 
+0200
@@ -1,5 +1,5 @@
 name:                tasty-silver
-version:             3.1.8.1
+version:             3.1.9
 synopsis:            A fancy test runner, including support for golden tests.
 description:
   This package provides a fancy test runner and support for «golden testing».
@@ -17,13 +17,14 @@
 license-file:        LICENSE
 Homepage:            https://github.com/phile314/tasty-silver
 Bug-reports:         https://github.com/phile314/tasty-silver/issues
-author:              Roman Cheplyaka, Philipp Hausmann and others
+author:              Philipp Hausmann, Roman Cheplyaka and others
 maintainer:          Philipp Hausmann
 -- copyright:           
 category:            Testing
 build-type:          Simple
 cabal-version:       >=1.14
 extra-source-files:  CHANGELOG.md
+tested-with:         GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, 
GHC == 8.0.1
 
 Source-repository head
   type:     git


Reply via email to