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 $@;
15 my $q = Test::Quvi->new;
19 data/format/default/ignore/length_bytes
22 my $c = $q->get_config;
23 push @dirs, "data/format/default/todo" if $c->{todo};
24 push @dirs, "data/format/default/nlfy" if $c->{nlfy};
25 push @dirs, "data/format/default/nsfw" if $c->{nsfw};
27 my @files = $q->find_json(@dirs);
29 plan skip_all => "Nothing to test" if scalar @files == 0;
30 plan tests => scalar @files * 2;
32 my $j = $q->get_json_obj;
33 my $ign = qr|/ignore/(.*?)/|;
37 my $e = $q->read_json($_);
39 $q->mark_ignored(\$e, $1) if $_ =~ /$ign/;
41 my ($r, $o) = $q->run($e->{page_url}, "-qr");
42 is($r, 0, "quvi exit status == 0")
43 or diag $e->{page_url};
46 skip 'quvi exit status != 0', 1 if $r != 0;
47 cmp_deeply($j->decode($o), $e, "compare with $_")
48 or diag $e->{page_url};
52 # vim: set ts=2 sw=2 tw=72 expandtab: