projects
/
functorrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1001ed0
)
Add one more metainfo test
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Wed, 26 Jul 2017 11:58:42 +0000
(17:28 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Wed, 26 Jul 2017 11:58:42 +0000
(17:28 +0530)
test/MetainfoTests.hs
patch
|
blob
|
history
diff --git
a/test/MetainfoTests.hs
b/test/MetainfoTests.hs
index 86ecf482e16c7079886896b631d90d9a29dfe503..824bb64ee1d50568e1ba81c84ced0269ab51516d 100644
(file)
--- a/
test/MetainfoTests.hs
+++ b/
test/MetainfoTests.hs
@@
-11,7
+11,13
@@
import Data.ByteString (readFile)
tests :: IO ()
tests = hspec $ do
describe "read and interpret a torrent file 1" $ do
- it "valid
announceList
" $ do
+ it "valid
torrent file
" $ do
fc <- readFile "data/debian-7.8.0-amd64-CD-1.iso.torrent"
(torrentToMetainfo fc) `shouldNotBe` (Left "parse error")
+ it "valid announce list" $ do
+ fc <- readFile "data/debian-7.8.0-amd64-CD-1.iso.torrent"
+ case torrentToMetainfo fc of
+ Left _ -> pending
+ Right metainfo -> do
+ announceList metainfo `shouldNotBe` []