[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
291/329: gnu: ghc-microlens-aeson: Patch tests for i686-linux.
From: |
guix-commits |
Subject: |
291/329: gnu: ghc-microlens-aeson: Patch tests for i686-linux. |
Date: |
Wed, 20 Nov 2019 21:18:46 -0500 (EST) |
samplet pushed a commit to branch master
in repository guix.
commit b4a00fecfd8c21ebce88d5ac9b23e61315e739a2
Author: Timothy Sample <address@hidden>
Date: Fri Nov 8 01:55:07 2019 -0500
gnu: ghc-microlens-aeson: Patch tests for i686-linux.
* gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch: New file.
* gnu/local.mk: Add it.
* gnu/packages/haskell-xyz.scm (ghc-microlens-aeson): Use it.
---
gnu/local.mk | 1 +
gnu/packages/haskell-xyz.scm | 1 +
.../patches/ghc-microlens-aeson-fix-tests.patch | 27 ++++++++++++++++++++++
3 files changed, 29 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 8e937c8..f7d37c4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -881,6 +881,7 @@ dist_patch_DATA =
\
%D%/packages/patches/ghc-diff-swap-cover-args.patch \
%D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch
\
%D%/packages/patches/ghc-hpack-fix-tests.patch \
+ %D%/packages/patches/ghc-microlens-aeson-fix-tests.patch \
%D%/packages/patches/ghc-monad-par-fix-tests.patch \
%D%/packages/patches/ghc-pandoc-fix-html-tests.patch \
%D%/packages/patches/ghc-pandoc-fix-latex-test.patch \
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index 7d3c94c..f352f6b 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -6591,6 +6591,7 @@ stripped. As the result, this package has no
dependencies.")
(uri (string-append "https://hackage.haskell.org/package/"
"microlens-aeson/microlens-aeson-"
version ".tar.gz"))
+ (patches (search-patches "ghc-microlens-aeson-fix-tests.patch"))
(sha256
(base32
"0w630kk5bnily1qh41081gqgbwmslrh5ad21899gwnb2r3jripyw"))))
diff --git a/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch
b/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch
new file mode 100644
index 0000000..c1ef6a8
--- /dev/null
+++ b/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch
@@ -0,0 +1,27 @@
+This patch fixes the test suite to allow any order when listing the
+members of a JSON object. Aeson (being true to the JSON specification)
+does not specify an order for objects. In practice, the order depends
+on your processor architecture.
+
+See <https://github.com/bos/aeson/issues/568> for a discussion resulting
+in a similar patch fixing the Aeson tests.
+
+See <https://github.com/fosskers/microlens-aeson/issues/1> for the
+upstream bug report.
+
+diff -ruN a/test/Test.hs b/test/Test.hs
+--- a/test/Test.hs 2018-12-31 15:10:50.000000000 -0500
++++ b/test/Test.hs 2019-11-08 01:34:07.419706831 -0500
+@@ -48,8 +48,10 @@
+ , testCase "" $ ("{\"a\": {}, \"b\": null}" ^? key (T.pack "b") .
_Object) @?= Nothing
+ , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? key (T.pack "a")) @?= Just
(Number 100.0)
+ , testCase "" $ ("[1,2,3]" ^? key (T.pack "a")) @?= Nothing
+- , testCase "" $ ("{\"a\": 4, \"b\": 7}" ^.. members) @?= [Number
4.0,Number 7.0]
+- , testCase "" $ ("{\"a\": 4, \"b\": 7}" & members . _Number %~ (* 10))
@?= "{\"a\":40,\"b\":70}"
++ , testCase "" $ assertBool "" (let x = ("{\"a\": 4, \"b\": 7}" ^..
members)
++ in x == [Number 4.0,Number 7.0] || x ==
[Number 7.0,Number 4.0])
++ , testCase "" $ assertBool "" (let x = ("{\"a\": 4, \"b\": 7}" & members
. _Number %~ (* 10))
++ in x == "{\"a\":40,\"b\":70}" || x ==
"{\"b\":70,\"a\":40}")
+ , testCase "" $ ("[1,2,3]" ^? nth 1) @?= Just (Number 2.0)
+ , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? nth 1) @?= Nothing
+ , testCase "" $ ("[1,2,3]" & nth 1 .~ Number 20) @?= "[1,20,3]"
- 312/329: gnu: Add ghc-dictionary-sharing., (continued)
- 312/329: gnu: Add ghc-dictionary-sharing., guix-commits, 2019/11/20
- 319/329: gnu: Add ghc-numeric-extras., guix-commits, 2019/11/20
- 325/329: gnu: Add ghc-diagrams-svg., guix-commits, 2019/11/20
- 328/329: gnu: ghc-haddock: Update to 2.22.0., guix-commits, 2019/11/20
- 266/329: gnu: cabal-install: Update to 2.4.0.0., guix-commits, 2019/11/20
- 277/329: gnu: Add ghc-getopt-generics., guix-commits, 2019/11/20
- 286/329: gnu: ghc-pandoc-citeproc: Update to 0.16.2., guix-commits, 2019/11/20
- 280/329: gnu: Add ghc-microlens-aeson., guix-commits, 2019/11/20
- 290/329: gnu: darcs: Fix Cabal dependency constraints., guix-commits, 2019/11/20
- 283/329: gnu: Add ghc-ipynb., guix-commits, 2019/11/20
- 291/329: gnu: ghc-microlens-aeson: Patch tests for i686-linux.,
guix-commits <=
- 278/329: gnu: Add ghc-unicode-transforms., guix-commits, 2019/11/20
- 279/329: gnu: Add ghc-hsyaml., guix-commits, 2019/11/20
- 293/329: gnu: ghc-stylish-haskell: Fix Cabal dependency constraints., guix-commits, 2019/11/20
- 284/329: gnu: ghc-pandoc: Update to 2.7.3., guix-commits, 2019/11/20
- 292/329: gnu: ghc-bsb-http-chunked: Disable tests on i686-linux., guix-commits, 2019/11/20
- 298/329: gnu: ghc-equivalence: Update to 0.3.5., guix-commits, 2019/11/20
- 303/329: gnu: idris: Fix Cabal dependency constraints., guix-commits, 2019/11/20
- 301/329: gnu: agda: Update to 2.6.0.1., guix-commits, 2019/11/20
- 300/329: gnu: ghc-atomic-primops: Update to 0.8.3., guix-commits, 2019/11/20
- 307/329: gnu: Add ghc-timezone-olson., guix-commits, 2019/11/20