Mark foundrymusic.lua as fixme
[libquvi-scripts.git] / tests / t / nosupport.t
blobb951ba90009a8f4727420e4155859128692e3884
2 use warnings;
3 use strict;
5 use Test::More;
7 eval "use JSON::XS";
8 plan skip_all => "JSON::XS required for testing" if $@;
10 eval "use Test::Deep";
11 plan skip_all => "Test::Deep required for testing" if $@;
13 use Test::Quvi;
15 my $q = Test::Quvi->new;
17 plan skip_all => "TEST_SKIP rule"
18   if $q->test_skip("nosupport");
20 my @a = qw(
21   http://youtu.be/3WSQH__H1XE
22   http://youtu.be/watch?v=3WSQH__H1XE
23   http://youtu.be/embed/3WSQH__H1XE
24   http://youtu.be/v/3WSQH__H1XE
25   http://youtu.be/e/3WSQH__H1XE
26   http://youtube.com/watch?v=3WSQH__H1XE
27   http://youtube.com/embed/3WSQH__H1XE
28   http://jp.youtube.com/watch?v=3WSQH__H1XE
29   http://jp.youtube-nocookie.com/e/3WSQH__H1XE
30   http://jp.youtube.com/embed/3WSQH__H1XE
31   );
33 plan tests => 1 + scalar @a;
35 # Make a note of the use of /dev/null
36 my ($r) = $q->run("http://nosupport.url", "--support -qr 2>/dev/null");
37 is($r, 0x41, "quvi exit status == QUVI_NOSUPPORT");
39 foreach (@a)
41   ($r) = $q->run($_, "--support -qr");
42   is($r, 0x00, "quvi exit status == QUVI_OK");
45 # vim: set ts=2 sw=2 tw=72 expandtab: