/[Search-Estraier]/trunk/t/5_Node.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/5_Node.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 37 by dpavlin, Thu Jan 5 22:16:21 2006 UTC revision 38 by dpavlin, Thu Jan 5 22:27:03 2006 UTC
# Line 17  isa_ok($node, 'Search::Estraier::Node'); Line 17  isa_ok($node, 'Search::Estraier::Node');
17    
18  ok($node->set_url('http://localhost:1978/'), 'set_url');  ok($node->set_url('http://localhost:1978/'), 'set_url');
19    
20  ok($node->set_proxy('proxy.example.com', 8080), 'set_proxy');  ok($node->set_proxy('', 8080), 'set_proxy');
21  throws_ok {$node->set_proxy('proxy.example.com', 'foo') } qr/port/, 'set_proxy port NaN';  throws_ok {$node->set_proxy('proxy.example.com', 'foo') } qr/port/, 'set_proxy port NaN';
22    
23  ok($node->set_timeout(42), 'set_timeout');  ok($node->set_timeout(42), 'set_timeout');
# Line 27  ok($node->set_auth('foo','bar'), 'set_au Line 27  ok($node->set_auth('foo','bar'), 'set_au
27    
28  cmp_ok($node->status, '==', -1, 'status');  cmp_ok($node->status, '==', -1, 'status');
29    
30    my @res = ( -1, 200 );
31    
32  my $nodelist;  my $nodelist;
33  foreach my $url (qw{?action=nodelist http://localhost/master_ui?action=nodelist}) {  foreach my $url (qw{?action=nodelist http://localhost:1978/master_ui?action=nodelist}) {
34          cmp_ok(          cmp_ok(
35                  $node->shuttle_url( $url, 'text/plain', undef, \$nodelist)                  $node->shuttle_url( $url, 'text/plain', undef, \$nodelist)
36          ,'==', 200, 'nodelist');          ,'==', shift @res, 'nodelist');
37  }  }
38    
39  my $draft = <<'_END_OF_DRAFT_';  my $draft = <<'_END_OF_DRAFT_';

Legend:
Removed from v.37  
changed lines
  Added in v.38

  ViewVC Help
Powered by ViewVC 1.1.26