root/WWW-OpenSearch/trunk/t/01_live.t

Revision 2407 (checked in by bricas, 13 years ago)

perltidy

Line 
1 use strict;
2 use Test::More;
3
4 my $url = $ENV{ OPENSEARCH_URL };
5 unless ( $url ) {
6     Test::More->import( skip_all => "OPENSEARCH_URL not set" );
7     exit;
8 }
9
10 # XXX This is not testing, but for debugging :)
11 plan 'no_plan';
12
13 use WWW::OpenSearch;
14
15 my $engine = WWW::OpenSearch->new( $url );
16 ok $engine;
17 ok $engine->description->shortname, $engine->description->shortname;
18
19 my $res = $engine->search( "iPod" );
20 ok $res;
21 ok $res->feed->title, $res->feed->title;
22 ok $res->feed->link,  $res->feed->link;
23 ok $res->pager->entries_per_page,
24     "items per page " . $res->pager->entries_per_page;
25 ok $res->pager->total_entries, "total entries " . $res->pager->total_entries;
Note: See TracBrowser for help on using the browser.