diff options
author | Clint Adams <clint@debian.org> | 2012-05-01 00:20:04 +0400 |
---|---|---|
committer | Clint Adams <clint@debian.org> | 2012-05-01 00:20:04 +0400 |
commit | 7aafd7baa1c8f2eab0ce987692049d8d768f69af (patch) | |
tree | 585ec3ff750ce78c418823505d6e544b4970a75c /p/haskell-base64-bytestring/debian | |
parent | 69e72d045733b0395cb8561080ae4f75d18257d9 (diff) | |
download | DHG_packages-7aafd7baa1c8f2eab0ce987692049d8d768f69af.tar.gz |
haskell-base64-bytestring: New upstream version 0.1.1.1.
Diffstat (limited to 'p/haskell-base64-bytestring/debian')
-rw-r--r-- | p/haskell-base64-bytestring/debian/changelog | 8 | ||||
-rw-r--r-- | p/haskell-base64-bytestring/debian/control | 9 | ||||
-rw-r--r-- | p/haskell-base64-bytestring/debian/patches/missing-testsuite.diff | 119 | ||||
-rw-r--r-- | p/haskell-base64-bytestring/debian/patches/series | 1 | ||||
-rwxr-xr-x | p/haskell-base64-bytestring/debian/rules | 2 |
5 files changed, 137 insertions, 2 deletions
diff --git a/p/haskell-base64-bytestring/debian/changelog b/p/haskell-base64-bytestring/debian/changelog index 26543f3ef..0c430ddb8 100644 --- a/p/haskell-base64-bytestring/debian/changelog +++ b/p/haskell-base64-bytestring/debian/changelog @@ -1,3 +1,11 @@ +haskell-base64-bytestring (0.1.1.1-1) unstable; urgency=low + + * New upstream version. + * Bump to Standards-Version 3.9.3. + * Enable test suite. + + -- Clint Adams <clint@debian.org> Mon, 30 Apr 2012 16:10:54 -0400 + haskell-base64-bytestring (0.1.1.0-1) unstable; urgency=low * New upstream release diff --git a/p/haskell-base64-bytestring/debian/control b/p/haskell-base64-bytestring/debian/control index 8d80d5076..c5c56a9cc 100644 --- a/p/haskell-base64-bytestring/debian/control +++ b/p/haskell-base64-bytestring/debian/control @@ -5,11 +5,16 @@ Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.or Uploaders: Clint Adams <clint@debian.org> Build-Depends: debhelper (>= 7) , cdbs - , haskell-devscripts (>= 0.8) + , haskell-devscripts (>= 0.8.10) , ghc , ghc-prof + , libghc-quickcheck2-dev + , libghc-hunit-dev + , libghc-test-framework-dev + , libghc-test-framework-quickcheck2-dev + , libghc-test-framework-hunit-dev Build-Depends-Indep: ghc-doc -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 Homepage: http://hackage.haskell.org/package/base64-bytestring Vcs-Darcs: http://darcs.debian.org/pkg-haskell/haskell-base64-bytestring Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/haskell-base64-bytestring diff --git a/p/haskell-base64-bytestring/debian/patches/missing-testsuite.diff b/p/haskell-base64-bytestring/debian/patches/missing-testsuite.diff new file mode 100644 index 000000000..ded0c155f --- /dev/null +++ b/p/haskell-base64-bytestring/debian/patches/missing-testsuite.diff @@ -0,0 +1,119 @@ +--- /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 --git a/p/haskell-base64-bytestring/debian/patches/series b/p/haskell-base64-bytestring/debian/patches/series new file mode 100644 index 000000000..448637972 --- /dev/null +++ b/p/haskell-base64-bytestring/debian/patches/series @@ -0,0 +1 @@ +missing-testsuite.diff diff --git a/p/haskell-base64-bytestring/debian/rules b/p/haskell-base64-bytestring/debian/rules index 683e77bcf..01f1aaf04 100755 --- a/p/haskell-base64-bytestring/debian/rules +++ b/p/haskell-base64-bytestring/debian/rules @@ -1,4 +1,6 @@ #!/usr/bin/make -f +DEB_ENABLE_TESTS = yes + include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/hlibrary.mk |