]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/perl | |
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | use Test::RequiresInternet 'offliberty.com' => 80; | |
6 | use Test::More tests => 4; | |
7 | use WWW::Offliberty qw/off/; | |
8 | ||
9 | my @results; | |
10 | @results = off 'https://vimeo.com/45196609'; | |
11 | cmp_ok @results, '>=', 1, 'vimeo'; | |
12 | ||
13 | @results = off 'https://vimeo.com/45196609', video_file => 1; | |
14 | cmp_ok @results, '>=', 1, 'vimeo, video_file => 1'; | |
15 | ||
16 | my $allresults = join ' ', @results; | |
17 | like $allresults, qr/\.mp4/, 'some URL contains ".mp4"'; | |
18 | unlike $allresults, qr/offwarning/, 'no URL contains "offwarning"'; |