]> git.rkrishnan.org Git - functorrent.git/commitdiff
magneturi: add another test
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Thu, 20 Jul 2017 15:18:03 +0000 (20:48 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Thu, 20 Jul 2017 15:18:03 +0000 (20:48 +0530)
test/MagneturiTests.hs

index 7dd83c46ee0dbdc77337e94bc8bce1cc4ca8dd9a..4446d284ee32e754c10521fa74019cb0f4e8ae96 100644 (file)
@@ -35,3 +35,6 @@ tests = hspec $ do
       parseMagneturi "magnet:?xt=urn:btih:1f8a4ee3c3f57e81f8f0b4e658177201fc2a3118&dn=Honey+Bee+2+%5B2017%5D+Malayalam+DVDRiP+x264+AAC+700MB+ZippyMovieZ+E&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969"
       `shouldBe` (Right (Magnetinfo {infoHash = "urn:btih:1f8a4ee3c3f57e81f8f0b4e658177201fc2a3118", trackerlist = [ "udp://tracker.leechers-paradise.org:6969", "udp://zer0day.ch:1337", "udp://open.demonii.com:1337", "udp://tracker.coppersurfer.tk:6969", "udp://exodus.desync.com:6969"], name = "Honey+Bee+2+[2017]+Malayalam+DVDRiP+x264+AAC+700MB+ZippyMovieZ+E", xlen = Nothing}))
 
+    it "Valid MagnetURI with tracker list 2" $ do
+      parseMagneturi "magnet:?xt=urn:btih:88c491dbbcdb0bb1ad142fabddd1436c09f17e7e&dn=CIA+Comrade+in+America+%282017%29+Malayalam+DESI+SCR+x264+AAC+700MB+&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969"
+      `shouldBe` (Right (Magnetinfo {infoHash = "urn:btih:88c491dbbcdb0bb1ad142fabddd1436c09f17e7e", trackerlist = ["udp://tracker.leechers-paradise.org:6969","udp://zer0day.ch:1337","udp://open.demonii.com:1337","udp://tracker.coppersurfer.tk:6969","udp://exodus.desync.com:6969"], name = "CIA+Comrade+in+America+(2017)+Malayalam+DESI+SCR+x264+AAC+700MB+", xlen = Nothing }))