[Pkg-haskell-commits] darcs: haskell-base64-bytestring: New upstream version 1.0.0.0.

Clint Adams clint at debian.org
Sat Oct 20 03:27:09 UTC 2012


Sat Oct 20 03:26:59 UTC 2012  Clint Adams <clint at debian.org>
  * New upstream version 1.0.0.0.
  Ignore-this: 40d9ca71a0689f9ec117c999cc06a8c7

    M ./changelog -2 +6
    R ./patches/missing-testsuite.diff
    M ./patches/series -1

Sat Oct 20 03:26:59 UTC 2012  Clint Adams <clint at debian.org>
  * New upstream version 1.0.0.0.
  Ignore-this: 40d9ca71a0689f9ec117c999cc06a8c7
diff -rN -u old-haskell-base64-bytestring//changelog new-haskell-base64-bytestring//changelog
--- old-haskell-base64-bytestring//changelog	2012-10-20 03:27:09.047721097 +0000
+++ new-haskell-base64-bytestring//changelog	2012-10-20 03:27:09.051721206 +0000
@@ -1,10 +1,14 @@
-haskell-base64-bytestring (0.1.1.1-3) UNRELEASED; urgency=low
+haskell-base64-bytestring (1.0.0.0-1) experimental; urgency=low
 
+  [ Joachim Breitner ]
   * Depend on haskell-devscripts 0.8.13 to ensure this packages is built
     against experimental
   * Bump standards version, no change
 
- -- Joachim Breitner <nomeata at debian.org>  Sat, 13 Oct 2012 14:07:28 +0200
+  [ Clint Adams ]
+  * New upstream version.
+
+ -- Clint Adams <clint at debian.org>  Fri, 19 Oct 2012 23:23:14 -0400
 
 haskell-base64-bytestring (0.1.1.1-2) unstable; urgency=low
 
diff -rN -u old-haskell-base64-bytestring//patches/missing-testsuite.diff new-haskell-base64-bytestring//patches/missing-testsuite.diff
--- old-haskell-base64-bytestring//patches/missing-testsuite.diff	2012-10-20 03:27:09.027721992 +0000
+++ new-haskell-base64-bytestring//patches/missing-testsuite.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,119 +0,0 @@
---- /dev/null
-+++ b/tests/Tests.hs
-@@ -0,0 +1,116 @@
-+{-# LANGUAGE OverloadedStrings #-}
-+{-# OPTIONS_GHC -fno-warn-orphans #-}
-+
-+module Main (main) where
-+
-+import Test.Framework (Test, defaultMain, testGroup)
-+import Test.Framework.Providers.QuickCheck2 (testProperty)
-+import Test.Framework.Providers.HUnit (testCase)
-+
-+import Test.QuickCheck (Arbitrary(..))
-+
-+import Control.Monad (liftM)
-+import qualified Data.ByteString.Base64 as Base64
-+import qualified Data.ByteString.Base64.URL as Base64URL
-+import Data.ByteString (ByteString)
-+import Data.ByteString.Char8 ()
-+import qualified Data.ByteString as B
-+import Test.HUnit hiding (Test)
-+
-+
-+main :: IO ()
-+main = defaultMain tests
-+
-+tests :: [Test]
-+tests = [ 
-+    testGroup "Base64" [
-+        testProperty "decodeEncode" $
-+          genericDecodeEncode Base64.encode Base64.decode
-+      , testProperty "decodeEncode Lenient" $
-+          genericDecodeEncode Base64.encode
-+                              (liftM Right Base64.decodeLenient)
-+      , testGroup "base64-string tests" base64_string_tests 
-+    ]
-+  , testGroup "Base64URL" [
-+        testProperty "decodeEncode" $
-+          genericDecodeEncode Base64URL.encode Base64URL.decode
-+      , testProperty "decodeEncode Lenient" $
-+          genericDecodeEncode Base64URL.encode
-+                              (liftM Right Base64URL.decodeLenient)
-+      , testGroup "base64-string tests" base64url_string_tests 
-+    ]
-+  ]
-+
-+instance Arbitrary ByteString where
-+  arbitrary = liftM B.pack arbitrary
-+
-+-- | Decoding an encoded sintrg should produce the original string.
-+genericDecodeEncode :: (ByteString -> ByteString)
-+                    -> (ByteString -> Either String ByteString)
-+                    -> ByteString -> Bool
-+genericDecodeEncode enc dec x = case dec (enc x) of
-+                                  Left  _  -> False
-+                                  Right x' -> x == x'
-+  
-+--
-+-- Unit tests from base64-string
-+-- Copyright (c) Ian Lynagh, 2005, 2007.
-+--
-+
-+base64_string_tests :: [Test]
-+base64_string_tests = 
-+  base64_string_test Base64.encode Base64.decode testData ++
-+  base64_string_test Base64.encode decodeURL testData
-+  where decodeURL :: ByteString -> Either String ByteString
-+        decodeURL = liftM Right Base64.decodeLenient
-+        testData :: [(ByteString, ByteString)]
-+        testData = [("",                "")
-+                   ,("\0",              "AA==")
-+                   ,("\255",            "/w==")
-+                   ,("E",               "RQ==")
-+                   ,("Ex",              "RXg=")
-+                   ,("Exa",             "RXhh")
-+                   ,("Exam",            "RXhhbQ==")
-+                   ,("Examp",           "RXhhbXA=")
-+                   ,("Exampl",          "RXhhbXBs")
-+                   ,("Example",         "RXhhbXBsZQ==")
-+                   ,("Ex\0am\254ple",   "RXgAYW3+cGxl")
-+                   ,("Ex\0am\255ple",   "RXgAYW3/cGxl")
-+                   ]
-+
-+-- | Same as the base64_string_tests but using the alternative alphabet
-+base64url_string_tests :: [Test]
-+base64url_string_tests =
-+  base64_string_test Base64URL.encode Base64URL.decode testData ++
-+  base64_string_test Base64URL.encode decodeURL testData
-+  where decodeURL :: ByteString -> Either String ByteString
-+        decodeURL = liftM Right Base64URL.decodeLenient
-+        testData :: [(ByteString, ByteString)]
-+        testData = [("",                "")
-+                   ,("\0",              "AA==")
-+                   ,("\255",            "_w==")
-+                   ,("E",               "RQ==")
-+                   ,("Ex",              "RXg=")
-+                   ,("Exa",             "RXhh")
-+                   ,("Exam",            "RXhhbQ==")
-+                   ,("Examp",           "RXhhbXA=")
-+                   ,("Exampl",          "RXhhbXBs")
-+                   ,("Example",         "RXhhbXBsZQ==")
-+                   ,("Ex\0am\254ple",   "RXgAYW3-cGxl")
-+                   ,("Ex\0am\255ple",   "RXgAYW3_cGxl")
-+                   ]
-+
-+-- | Generic test given encod enad decode funstions and a
-+-- list of (plain, encoded) pairs
-+base64_string_test :: (ByteString -> ByteString)
-+                   -> (ByteString -> Either String ByteString)
-+                   -> [(ByteString, ByteString)] -> [Test]
-+base64_string_test enc dec testData = concat
-+      [ [ testCase ("base64-string: Encode " ++ show plain)
-+                   (encoded_plain @?= encoded),
-+          testCase ("base64-string: Decode " ++ show plain)
-+                   (decoded_encoded @?= Right plain) ]
-+      | (plain, encoded) <- testData,
-+        let encoded_plain = enc plain
-+            decoded_encoded = dec encoded
-+      ]
diff -rN -u old-haskell-base64-bytestring//patches/series new-haskell-base64-bytestring//patches/series
--- old-haskell-base64-bytestring//patches/series	2012-10-20 03:27:09.027721992 +0000
+++ new-haskell-base64-bytestring//patches/series	2012-10-20 03:27:09.055721631 +0000
@@ -1,2 +1 @@
-missing-testsuite.diff
 no-threaded-testsuite





More information about the Pkg-haskell-commits mailing list