Hello community,
here is the log from the commit of package ghc-quickcheck-text for
openSUSE:Factory checked in at 2016-11-02 12:47:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-quickcheck-text (Old)
and /work/SRC/openSUSE:Factory/.ghc-quickcheck-text.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-quickcheck-text"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-quickcheck-text/ghc-quickcheck-text.changes
2016-10-22 13:18:52.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-quickcheck-text.new/ghc-quickcheck-text.changes
2016-11-02 12:47:30.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Sep 26 06:51:54 UTC 2016 - [email protected]
+
+- Update to version 0.1.2.1 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
quickcheck-text-0.1.1.0.tar.gz
New:
----
quickcheck-text-0.1.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-quickcheck-text.spec ++++++
--- /var/tmp/diff_new_pack.bPCBeL/_old 2016-11-02 12:47:31.000000000 +0100
+++ /var/tmp/diff_new_pack.bPCBeL/_new 2016-11-02 12:47:31.000000000 +0100
@@ -19,22 +19,20 @@
%global pkg_name quickcheck-text
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.1.1.0
+Version: 0.1.2.1
Release: 0
Summary: Alternative arbitrary instance for Text
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-QuickCheck-devel
BuildRequires: ghc-binary-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-text-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
%description
The usual Arbitrary instance for Text (in
@@ -58,20 +56,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
++++++ quickcheck-text-0.1.1.0.tar.gz -> quickcheck-text-0.1.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quickcheck-text-0.1.1.0/quickcheck-text.cabal
new/quickcheck-text-0.1.2.1/quickcheck-text.cabal
--- old/quickcheck-text-0.1.1.0/quickcheck-text.cabal 2016-06-19
07:32:26.000000000 +0200
+++ new/quickcheck-text-0.1.2.1/quickcheck-text.cabal 2016-09-22
11:15:49.000000000 +0200
@@ -1,5 +1,5 @@
name: quickcheck-text
-version: 0.1.1.0
+version: 0.1.2.1
synopsis: Alternative arbitrary instance for Text
description: The usual Arbitrary instance for Text
(in
@@ -26,7 +26,7 @@
library
exposed-modules: Test.QuickCheck.Utf8
Data.Text.Arbitrary
- build-depends: base >=4.7 && <5
+ build-depends: base >=4 && <5
, QuickCheck
, binary
, bytestring
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quickcheck-text-0.1.1.0/src/Test/QuickCheck/Utf8.hs
new/quickcheck-text-0.1.2.1/src/Test/QuickCheck/Utf8.hs
--- old/quickcheck-text-0.1.1.0/src/Test/QuickCheck/Utf8.hs 2016-06-19
07:27:01.000000000 +0200
+++ new/quickcheck-text-0.1.2.1/src/Test/QuickCheck/Utf8.hs 2016-09-22
11:15:49.000000000 +0200
@@ -12,6 +12,8 @@
, shrinkUtf8BS1
-- * Generators for single characters
+ , genChar
+ , genUtf8Character
, oneByte
, twoByte
, threeByte
@@ -83,6 +85,20 @@
inRange :: Int -> Int -> Gen Word8
inRange lo hi = fmap fromIntegral $ elements [lo..hi]
+-- | Generate a valid 'Char'. Note that this is UTF-16, not UTF-8, but
+-- the intent is the same: the Arbitrary instance for 'Char' in quickcheck
+-- makes no attempt to generate valid non-ASCII characters at this time.
+genChar :: Gen Char
+genChar = fmap (T.head . decodeUtf8) genUtf8Character
+
+-- | A valid UTF-8 character, one to three bytes long.
+genUtf8Character :: Gen ByteString
+genUtf8Character = oneof [
+ oneByte
+ , twoByte
+ , threeByte
+ ]
+
-- | Single-byte UTF-8 (i.e., a standard ASCII byte with a cleared MSB).
oneByte :: Gen ByteString
oneByte = fmap (BS.pack . return) $