packages feed

zip 1.3.0 → 1.3.1

raw patch · 3 files changed

+25/−15 lines, 3 files

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## Zip 1.3.1++* The test suite is now faster.+ ## Zip 1.3.0  * Dropped support for GHC 8.2 and older.
tests/Main.hs view
@@ -159,7 +159,7 @@ instance Arbitrary EC where   arbitrary = do     let f (EM s d z) = (s, (d, z))-    m <- M.fromList . fmap f <$> listOf arbitrary+    m <- M.fromList . fmap f <$> downScale (listOf arbitrary)     return (EC (M.map fst m) (sequence_ $ snd <$> M.elems m))  charGen :: Gen Char@@ -662,18 +662,19 @@ packDirRecurSpec :: SpecWith FilePath packDirRecurSpec =   it "packs arbitrary directory recursively" $-    \path -> property $ \contents ->-      withSystemTempDirectory "zip-sandbox" $ \dir -> do-        forM_ contents $ \s -> do-          let item = dir </> unEntrySelector s-          createDirectoryIfMissing True (FP.takeDirectory item)-          B.writeFile item "foo"-        selectors <--          createArchive path $ do-            packDirRecur Store mkEntrySelector dir-            commit-            M.keysSet <$> getEntries-        selectors `shouldBe` E.fromList contents+    \path -> property $+      forAll (downScale arbitrary) $ \contents ->+        withSystemTempDirectory "zip-sandbox" $ \dir -> do+          forM_ contents $ \s -> do+            let item = dir </> unEntrySelector s+            createDirectoryIfMissing True (FP.takeDirectory item)+            B.writeFile item "foo"+          selectors <-+            createArchive path $ do+              packDirRecur Store mkEntrySelector dir+              commit+              M.keysSet <$> getEntries+          selectors `shouldBe` E.fromList contents  unpackIntoSpec :: SpecWith FilePath unpackIntoSpec =@@ -691,6 +692,11 @@  ---------------------------------------------------------------------------- -- Helpers++-- | Change the size parameter of generator by dividing it by 2.++downScale :: Gen a -> Gen a+downScale = scale (`div` 2)  -- | Check whether given exception is 'EntrySelectorException' with specific -- path inside.
zip.cabal view
@@ -1,7 +1,7 @@ name:                 zip-version:              1.3.0+version:              1.3.1 cabal-version:        1.18-tested-with:          GHC==8.4.4, GHC==8.6.5, GHC==8.8.1+tested-with:          GHC==8.4.4, GHC==8.6.5, GHC==8.8.3 license:              BSD3 license-file:         LICENSE.md author:               Mark Karpov <markkarpov92@gmail.com>