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 my $q = Test::Quvi->new;
19 plan skip_all => "TEST_SKIP rule"
20 if $q->test_skip("shortened");
22 # All roads lead to (same) URL.
25 # Resolved without querying over the internet.
26 "http://dai.ly/cityofscars",
28 # Query over the internet to resolved this one.
32 my $f = "data/resolve/shortened.json";
34 # 1=prepend --data-root (if specified in cmdline)
35 my $e = $q->read_json($f, 1);
37 # dailymotion returns content-length that varies from
38 # time to time, no idea why.
39 $q->mark_ignored(\$e, 'length_bytes');
43 my ($r, $o) = $q->run($_, "-q");
44 is($r, 0, "quvi exit status == 0")
48 skip 'quvi exit status != 0', 1 if $r != 0;
49 my $j = $q->get_json_obj;
50 cmp_deeply($j->decode($o), $e, "compare with $f")
55 # vim: set ts=2 sw=2 tw=72 expandtab: