From: Jaseem Abid Date: Sat, 21 Feb 2015 18:59:06 +0000 (+0530) Subject: Fix failing test X-Git-Url: https://git.rkrishnan.org/pf/content/en.html?a=commitdiff_plain;h=4022aabc4924422edb6a9ef0b77689ea457e40cb;p=functorrent.git Fix failing test --- diff --git a/src/Tracker.hs b/src/Tracker.hs index 65290c3..eab0979 100644 --- a/src/Tracker.hs +++ b/src/Tracker.hs @@ -17,8 +17,8 @@ type Url = String -- | urlEncodeHash -- --- >>> urlEncodeHash $ BC.pack "123456789abcdef123456789abcdef123456789a" --- "%124vx%9a%bc%de%f1%23Eg%89%ab%cd%ef%124Vx%9a" +-- >>> urlEncodeHash $ pack "123456789abcdef123456789abcdef123456789a" +-- "%124Vx%9a%bc%de%f1%23Eg%89%ab%cd%ef%124Vx%9a" urlEncodeHash :: ByteString -> String urlEncodeHash bs = concatMap (encode' . unpack) (splitN 2 bs) where encode' b@[c1, c2] = let c = chr (read ("0x" ++ b))