root/WWW-OpenSearch/branches/WWW-OpenSearch-rewrite/t/01_live.t

Revision 1820 (checked in by bricas, 14 years ago)

updated some tests

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, "items per page " . $res->pager->entries_per_page;
24 ok $res->pager->total_entries, "total entries " . $res->pager->total_entries;
Note: See TracBrowser for help on using the browser.