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 $@;
17 # All roads lead to (same) URL.
20 # Resolved without querying over the internet.
21 "http://dai.ly/cityofscars",
23 # Query over the internet to resolved this one.
27 my $q = Test::Quvi->new;
28 my $f = "data/resolve/shortened.json";
30 # 1=prepend --data-root (if specified in cmdline)
31 my $e = $q->read_json($f, 1);
33 # dailymotion returns content-length that varies from
34 # time to time, no idea why.
35 $q->mark_ignored(\$e, 'length_bytes');
39 my ($r, $o) = $q->run($_, "-q");
40 is($r, 0, "quvi exit status == 0")
44 skip 'quvi exit status != 0', 1 if $r != 0;
45 my $j = $q->get_json_obj;
46 cmp_deeply($j->decode($o), $e, "compare with $f")