From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Fri, 28 Jul 2017 13:52:59 +0000 (+0530)
Subject: test pass
X-Git-Url: https://git.rkrishnan.org/listings/nxhtml.html?a=commitdiff_plain;h=d8f6d2ee948393ef149c19b72547aff57dfda7f6;p=functorrent.git

test pass
---

diff --git a/src/FuncTorrent/Bencode.hs b/src/FuncTorrent/Bencode.hs
index 28f0460..d4eb58c 100644
--- a/src/FuncTorrent/Bencode.hs
+++ b/src/FuncTorrent/Bencode.hs
@@ -152,7 +152,7 @@ bencDict = between (char 'd') (char 'e') $ fromList <$> many kvpair
                     return (k, v)
         bdictKey = do
           ds <- many1 digit <* char ':'
-          s <- count (read ds) alphaNum
+          s <- count (read ds) anyChar
           return s
 
 
diff --git a/test/MetainfoTests.hs b/test/MetainfoTests.hs
index 9f1a2e2..32d98e5 100644
--- a/test/MetainfoTests.hs
+++ b/test/MetainfoTests.hs
@@ -33,7 +33,6 @@ tests :: IO ()
 tests = do
   fc <- readFile "data/debian-7.8.0-amd64-CD-1.iso.torrent"
   let minfo = torrentToMetainfo fc
-  putStrLn $ show minfo
   hspec $ do
     describe "read and interpret a torrent file 1" $ do
       it "valid torrent file" $ do
@@ -54,7 +53,7 @@ tests = do
           Left _ -> pending
           Right metainfo -> do 
             let (Just i) = info metainfo
-            (length (filemeta i)) `shouldSatisfy` (== 0)
+            (length (filemeta i)) `shouldSatisfy` (== 1)
 
     describe "read and interpret a multifile torrent file" $ do
       it "valid multifile torrent file" $ do