Debian Codegraph @

ebay/t/coverage.t

raw ◀ ▶
1 Debian patch touch this file
1
2 # $Id: coverage.t,v 1.4 2006-01-08 03:27:13 Daddy Exp $
3
4 use ExtUtils::testlib;
•5 use Test::More;
6
7 use IO::Capture::Stderr;
8 my $oICE = IO::Capture::Stderr->new;
9
•10 use WWW::Search;
11 use WWW::Search::Ebay;
12
13 BEGIN {
14 unless ($ENV{NO_NETWORK}) {
15 no_plan();
16 }
17 else {
18 plan skip_all => "no network";
19 }
20 }
21
22
23 my $iDebug;
24 my $iDump = 0;
25
26 my $o = new WWW::Search('Ebay');
27 $o->{_debug} = 1;
28 $oICE->start;
29 # Trigger all the options-list handling:
30 $o->native_query('junk',
31 {
32 search_debug => 1,
33 search_parse_debug => 1,
34 foo => 'bar',
35 search_foo => undef,
36 baz => undef,
37 },
38 );
39 $oICE->stop;
40 my $o1 = new WWW::Search('Ebay');
41 # Call native_query with no options:
42 $o1->native_query('junk');
43 # Do an actual search with debugging turned on:
44 $oICE->start;
45 $o1->native_query('star wars taco bell',
46 {
47 search_debug => 1,
48 search_parse_debug => 1,
49 },
50 );
51 $o1->next_result;
52 $oICE->stop;
53
54 exit 0;
55
56 __END__
57