/[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 39 by dpavlin, Thu Jan 5 22:36:10 2006 UTC revision 40 by dpavlin, Thu Jan 5 23:00:22 2006 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use blib;  use blib;
5    
6  use Test::More tests => 12;  use Test::More tests => 14;
7  use Test::Exception;  use Test::Exception;
8  use Data::Dumper;  use Data::Dumper;
9    
10  BEGIN { use_ok('Search::Estraier') };  BEGIN { use_ok('Search::Estraier') };
11    
12    my $debug = 1;
13    
14  # name of node for test  # name of node for test
15  my $test_node = 'Search-Estraier';  my $test_node = 'Search-Estraier';
16    
17  ok(my $node = new Search::Estraier::Node(1), 'new');  ok(my $node = new Search::Estraier::Node($debug), 'new');
18  isa_ok($node, 'Search::Estraier::Node');  isa_ok($node, 'Search::Estraier::Node');
19    
20  ok($node->set_url('http://localhost:1978/'), 'set_url');  ok($node->set_url('http://localhost:1978/node/searchestraier'), 'set_url');
21    
22  ok($node->set_proxy('', 8080), 'set_proxy');  ok($node->set_proxy('', 8080), 'set_proxy');
23  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';
# Line 46  You know that we are living in a materia Line 48  You know that we are living in a materia
48  And I am a material girl  And I am a material girl
49  _END_OF_DRAFT_  _END_OF_DRAFT_
50    
51  diag "draft:\n$draft";  #diag "draft:\n$draft";
52    ok(my $doc = new Search::Estraier::Document($draft), 'new doc from draft');
53    
54    cmp_ok( $node->put_doc($doc), '==', 200, 'put_doc');

Legend:
Removed from v.39  
changed lines
  Added in v.40

  ViewVC Help
Powered by ViewVC 1.1.26