1 -- | Tests for Metainfo module
3 module MetainfoTests where
5 import Prelude hiding (readFile)
7 import FuncTorrent.Metainfo
9 import Data.ByteString (readFile)
13 describe "read and interpret a torrent file 1" $ do
14 it "valid torrent file" $ do
15 fc <- readFile "data/debian-7.8.0-amd64-CD-1.iso.torrent"
16 (torrentToMetainfo fc) `shouldNotBe` (Left "parse error")
17 it "valid announce list" $ do
18 fc <- readFile "data/debian-7.8.0-amd64-CD-1.iso.torrent"
19 case torrentToMetainfo fc of
22 announceList metainfo `shouldNotBe` []