From: Ramakrishnan Muthukrishnan Date: Thu, 20 Jul 2017 15:18:03 +0000 (+0530) Subject: magneturi: add another test X-Git-Url: https://git.rkrishnan.org/listings/specifications/frontends/FTP-and-SFTP.rst?a=commitdiff_plain;h=910d54a0f20e5f52c54711ea7035a37859a171bd;p=functorrent.git magneturi: add another test --- diff --git a/test/MagneturiTests.hs b/test/MagneturiTests.hs index 7dd83c4..4446d28 100644 --- a/test/MagneturiTests.hs +++ b/test/MagneturiTests.hs @@ -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 }))