Hello community, here is the log from the commit of package ghc-HUnit for openSUSE:Factory checked in at 2020-11-08 20:59:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-HUnit (Old) and /work/SRC/openSUSE:Factory/.ghc-HUnit.new.11331 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-HUnit" Sun Nov 8 20:59:07 2020 rev:20 rq:846890 version:1.6.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-HUnit/ghc-HUnit.changes 2020-09-15 16:18:28.130033311 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-HUnit.new.11331/ghc-HUnit.changes 2020-11-08 20:59:13.420298947 +0100 @@ -1,0 +2,7 @@ +Sun Nov 1 03:00:39 UTC 2020 - [email protected] + +- Update HUnit to version 1.6.1.0. + Upstream has not updated the file "CHANGELOG.md" since the last + release. + +------------------------------------------------------------------- Old: ---- HUnit-1.6.0.0.tar.gz New: ---- HUnit-1.6.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-HUnit.spec ++++++ --- /var/tmp/diff_new_pack.0rXQCR/_old 2020-11-08 20:59:13.996297831 +0100 +++ /var/tmp/diff_new_pack.0rXQCR/_new 2020-11-08 20:59:14.000297823 +0100 @@ -19,7 +19,7 @@ %global pkg_name HUnit %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.6.0.0 +Version: 1.6.1.0 Release: 0 Summary: A unit testing framework for Haskell License: BSD-3-Clause ++++++ HUnit-1.6.0.0.tar.gz -> HUnit-1.6.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HUnit-1.6.0.0/HUnit.cabal new/HUnit-1.6.1.0/HUnit.cabal --- old/HUnit-1.6.0.0/HUnit.cabal 2017-03-20 02:42:25.000000000 +0100 +++ new/HUnit-1.6.1.0/HUnit.cabal 2020-10-31 13:09:26.000000000 +0100 @@ -1,10 +1,11 @@ --- This file has been generated from package.yaml by hpack version 0.17.0. +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.33.0. -- -- see: https://github.com/sol/hpack name: HUnit -version: 1.6.0.0 -cabal-version: >= 1.10 +version: 1.6.1.0 license: BSD3 license-file: LICENSE author: Dean Herington @@ -17,7 +18,6 @@ description: HUnit is a unit testing framework for Haskell, inspired by the JUnit tool for Java, see: <http://www.junit.org>. build-type: Simple - extra-source-files: CHANGELOG.md README.md @@ -30,9 +30,9 @@ hs-source-dirs: src build-depends: - base == 4.*, - deepseq, - call-stack + base ==4.*, + call-stack, + deepseq exposed-modules: Test.HUnit.Base Test.HUnit.Lang @@ -51,15 +51,16 @@ tests examples build-depends: - base == 4.*, - deepseq, + HUnit, + base ==4.*, call-stack, - filepath, - HUnit + deepseq, + filepath other-modules: HUnitTestBase HUnitTestExtended TerminalTest Example + Paths_HUnit default-language: Haskell2010 ghc-options: -Wall diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HUnit-1.6.0.0/README.md new/HUnit-1.6.1.0/README.md --- old/HUnit-1.6.0.0/README.md 2017-03-20 02:42:25.000000000 +0100 +++ new/HUnit-1.6.1.0/README.md 2020-10-31 13:09:26.000000000 +0100 @@ -143,7 +143,7 @@ With `assertString` the two are combined. With `assertEqual` you provide a "preface", an expected value, and an actual value; the failure message shows the two unequal values and is prefixed by the preface. Additional ways to create assertions are - described later under [Avanced Features](#advanced-features) + described later under [Advanced Features](#advanced-features) Since assertions are `IO` computations, they may be combined--along with other `IO` computations--using `(>>=)`, `(>>)`, and the `do` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HUnit-1.6.0.0/src/Test/HUnit/Lang.hs new/HUnit-1.6.1.0/src/Test/HUnit/Lang.hs --- old/HUnit-1.6.0.0/src/Test/HUnit/Lang.hs 2017-03-20 02:42:25.000000000 +0100 +++ new/HUnit-1.6.1.0/src/Test/HUnit/Lang.hs 2020-10-31 13:09:26.000000000 +0100 @@ -44,14 +44,7 @@ (_, loc) : _ -> Just loc [] -> Nothing --- | Unconditionally signals that a failure has occured. All --- other assertions can be expressed with the form: --- --- @ --- if conditionIsMet --- then IO () --- else assertFailure msg --- @ +-- | Unconditionally signals that a failure has occurred. assertFailure :: HasCallStack => String -- ^ A message that is displayed with the assertion failure diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HUnit-1.6.0.0/src/Test/HUnit/Text.hs new/HUnit-1.6.1.0/src/Test/HUnit/Text.hs --- old/HUnit-1.6.0.0/src/Test/HUnit/Text.hs 2017-03-20 02:42:25.000000000 +0100 +++ new/HUnit-1.6.1.0/src/Test/HUnit/Text.hs 2020-10-31 13:09:26.000000000 +0100 @@ -7,7 +7,8 @@ putTextToHandle, putTextToShowS, runTestText, showPath, showCounts, - runTestTT + runTestTT, + runTestTTAndExit ) where @@ -16,6 +17,7 @@ import Data.CallStack import Control.Monad (when) import System.IO (Handle, stderr, hPutStr, hPutStrLn) +import System.Exit (exitSuccess, exitFailure) -- | As the general text-based test controller ('runTestText') executes a @@ -130,3 +132,21 @@ runTestTT :: Test -> IO Counts runTestTT t = do (counts', 0) <- runTestText (putTextToHandle stderr True) t return counts' + +-- | Convenience wrapper for 'runTestTT'. +-- Simply runs 'runTestTT' and then exits back to the OS, +-- using 'exitSuccess' if there were no errors or failures, +-- or 'exitFailure' if there were. For example: +-- +-- > tests :: Test +-- > tests = ... +-- > +-- > main :: IO () +-- > main = runTestTTAndExit tests + +runTestTTAndExit :: Test -> IO () +runTestTTAndExit tests = do + c <- runTestTT tests + if (errors c == 0) && (failures c == 0) + then exitSuccess + else exitFailure
