dataenc 0.14.0.4 → 0.14.0.5
raw patch · 3 files changed
+9/−9 lines, 3 filesdep ~QuickCheckPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: QuickCheck
API changes (from Hackage documentation)
Files
- dataenc.cabal +6/−6
- src/Codec/Binary/Base85.hs +2/−2
- test-src/DataencUT.hs +1/−1
dataenc.cabal view
@@ -1,13 +1,13 @@ name: dataenc-version: 0.14.0.4+version: 0.14.0.5 license: BSD3 license-file: LICENSE cabal-version: >= 1.6 build-type: Simple author: Magnus Therning-maintainer: magnus@therning.org+maintainer: none homepage: http://www.haskell.org/haskellwiki/Library/Data_encoding-copyright: Magnus Therning, 2007-2011+copyright: Magnus Therning, 2007-2012 category: Codec synopsis: Data encoding library description: Data encoding library currently providing Base16, Base32,@@ -15,7 +15,7 @@ Quoted-Printable, URL encoding, uuencode, xxencode, and yEncoding. extra-source-files: test-src/DataencUT.hs test-src/DataencQC.hs test-src/Test.hs GNUmakefile -flag BuildTests+flag tests Description: Build unit and quickcheck tests. Default: False @@ -43,9 +43,9 @@ main-is: Test.hs hs-source-dirs: test-src src -- ghc-options: -fhpc- if flag(BuildTests)+ if flag(tests) build-depends: test-framework, test-framework-hunit, HUnit,- test-framework-quickcheck2, QuickCheck ==2.4.*,+ test-framework-quickcheck2, QuickCheck ==2.5.*, test-framework-th else buildable: False
src/Codec/Binary/Base85.hs view
@@ -47,7 +47,7 @@ encodeInc e = eI [] e where enc4 [0, 0, 0, 0] = "z"- enc4 [20, 20, 20, 20] = "y"+ enc4 [0x20, 0x20, 0x20, 0x20] = "y" enc4 os@[o1, o2, o3, o4] = map (encodeArray !) group where group2Word32 = foldl (\ a b -> a `shiftL` 8 + fromIntegral b) 0 os@@ -109,7 +109,7 @@ dI lo DDone = DFail [] lo doDec acc ('z':cs) = doDec (acc ++ [0, 0, 0, 0]) cs- doDec acc ('y':cs) = doDec (acc ++ [20, 20, 20, 20]) cs+ doDec acc ('y':cs) = doDec (acc ++ [0x20, 0x20, 0x20, 0x20]) cs doDec acc s@(c1:c2:c3:c4:c5:cs) = maybe (DFail acc s) (\ bs -> doDec (acc ++ bs) cs)
test-src/DataencUT.hs view
@@ -84,7 +84,7 @@ , ("base85", "foob\0\0\0\0ar", "AoDTszEW", [102,111,111,98,0,0,0,0,114], base85) , ("base85", "Example", "7<i6XE,9(", [69,120,97,109,112,108,101], base85) , ("base85", "zeros", "z", [0, 0, 0, 0], base85)- , ("base85", "spaces", "y", [20, 20, 20, 20], base85)+ , ("base85", "spaces", "y", [0x20, 0x20, 0x20, 0x20], base85) ] case_base85Tests = mapM_ checkAssertions base85TestData