[Git][haskell-team/DHG_packages][master] hackage-security: force JSON strings to ASCII in property testing
Clint Adams
gitlab at salsa.debian.org
Sun Apr 15 23:25:47 BST 2018
Clint Adams pushed to branch master at Debian Haskell Group / DHG_packages
Commits:
8fc19d69 by Clint Adams at 2018-04-15T18:25:13-04:00
hackage-security: force JSON strings to ASCII in property testing
- - - - -
2 changed files:
- p/haskell-hackage-security/debian/changelog
- p/haskell-hackage-security/debian/patches/newer-deps
Changes:
=====================================
p/haskell-hackage-security/debian/changelog
=====================================
--- a/p/haskell-hackage-security/debian/changelog
+++ b/p/haskell-hackage-security/debian/changelog
@@ -1,3 +1,9 @@
+haskell-hackage-security (0.5.3.0-5) unstable; urgency=medium
+
+ * Force JSON strings to ASCII in property testing.
+
+ -- Clint Adams <clint at debian.org> Sun, 15 Apr 2018 18:04:40 -0400
+
haskell-hackage-security (0.5.3.0-4) unstable; urgency=medium
* Fix Build-Depends.
=====================================
p/haskell-hackage-security/debian/patches/newer-deps
=====================================
--- a/p/haskell-hackage-security/debian/patches/newer-deps
+++ b/p/haskell-hackage-security/debian/patches/newer-deps
@@ -17,3 +17,21 @@
hs-source-dirs: tests
default-language: Haskell2010
+--- a/tests/TestSuite/JSON.hs
++++ b/tests/TestSuite/JSON.hs
+@@ -46,12 +46,13 @@
+ [ (1, pure JSNull)
+ , (1, JSBool <$> arbitrary)
+ , (2, JSNum <$> arbitrary)
+- , (2, JSString <$> arbitrary)
++ , (2, JSString . getASCIIString <$> arbitrary)
+ , (3, JSArray <$> resize (sz `div` 2) arbitrary)
+- , (3, JSObject . noDupFields <$> resize (sz `div` 2) arbitrary)
++ , (3, JSObject . noDupFields . asciify <$> resize (sz `div` 2) arbitrary)
+ ]
+ where
+ noDupFields = nubBy (\(x,_) (y,_) -> x==y)
++ asciify = map (\(x,y) -> (getASCIIString x, y))
+
+ shrink JSNull = []
+ shrink (JSBool _) = []
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/commit/8fc19d695a9f20b41595836178b8627dc6f49189
---
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/commit/8fc19d695a9f20b41595836178b8627dc6f49189
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20180415/01f20e66/attachment-0001.html>
More information about the Pkg-haskell-commits
mailing list