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

Revision 1523 (checked in by miyagawa, 16 years ago)

impoert

  • Property svn:keywords set to Id Revision
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->{ShortName}, $engine->{ShoftName};
18
19 my $feed = $engine->search("iPod");
20 ok $feed;
21 ok $feed->channel->{title}, $feed->channel->{title};
22 ok $feed->channel->{link}, $feed->channel->{link};
23 ok $engine->pager->entries_per_page, "items per page " . $engine->pager->entries_per_page;
24 ok $engine->pager->total_entries, "total entries " . $engine->pager->total_entries;
25
26
Note: See TracBrowser for help on using the browser.