From d8f6d2ee948393ef149c19b72547aff57dfda7f6 Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Fri, 28 Jul 2017 19:22:59 +0530 Subject: [PATCH] test pass --- src/FuncTorrent/Bencode.hs | 2 +- test/MetainfoTests.hs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 -- 2.37.2