Commit | Line | Data |
---|---|---|
a0765f3d | 1 | #!/usr/bin/perl |
de48830a MG |
2 | use strict; |
3 | use warnings; | |
4 | ||
09f254ed | 5 | use Test::RequiresInternet 'offliberty.com' => 80; |
9dd40f61 | 6 | use Test::More tests => 4; |
de48830a MG |
7 | use WWW::Offliberty qw/off/; |
8 | ||
045faed6 | 9 | my @results; |
bae74615 | 10 | @results = off "https://youtube.com/watch?v=pJyQpAiMXkg"; |
d6ea2a75 | 11 | cmp_ok @results, '>=', 1, 'youtube'; |
de48830a | 12 | |
bae74615 | 13 | @results = off "https://youtube.com/watch?v=pJyQpAiMXkg", video_file => 1; |
045faed6 | 14 | is @results, 2, 'youtube, video_file => 1'; |
9dd40f61 MG |
15 | |
16 | like $results[1], qr/\.mp4/, 'video URL contains ".mp4"'; | |
17 | unlike $results[0], qr/offwarning/, 'audio URL doesn\'t contain "offwarning"'; |