/[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 117 by dpavlin, Sun Mar 12 19:43:21 2006 UTC revision 135 by dpavlin, Tue May 9 12:42:39 2006 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use blib;  use blib;
5    
6  use Test::More tests => 115;  use Test::More tests => 120;
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 = 0;  my $debug = 1;
13    
14  # name of node for test  # name of node for test
15  my $test1_node = 'test1';  my $test1_node = 'test1';
# Line 30  ok($node->set_auth('admin','admin'), 'se Line 30  ok($node->set_auth('admin','admin'), 'se
30    
31  cmp_ok($node->status, '==', -1, 'status');  cmp_ok($node->status, '==', -1, 'status');
32    
33    # test master functionality
34    
35    diag "not testing shutdown\n";
36    
37    ok(my $foo = $node->master( action => 'sync' ), 'sync');
38    
39    diag "not testing backup\n";
40    
41    ok(my @users = $node->master( action => 'userlist' ), 'userlist');
42    
43    diag "users: ", Dumper( \@users );
44    
45  SKIP: {  SKIP: {
46    
47  skip "no $test1_node node in Hyper Estraier", 105, unless($node->name);  skip "no $test1_node node in Hyper Estraier", 110, unless($node->name);
48    
49  my @res = ( -1, 200 );  my @res = ( -1, 200 );
50    
# Line 156  ok(! $node->uri_to_id('foobar'), 'uri_to Line 168  ok(! $node->uri_to_id('foobar'), 'uri_to
168  ok(! $node->admins, 'no admins');  ok(! $node->admins, 'no admins');
169  ok(! $node->guests, 'no guests');  ok(! $node->guests, 'no guests');
170    
171    # test search without results
172    
173    ok($cond = new Search::Estraier::Condition, 'new cond');
174    ok($cond->set_phrase('this_is_phrase_which_does_not_exits'), 'cond set_phrase');
175    
176    ok($nres = $node->search( $cond, 0 ), 'search');
177    
178  SKIP: {  SKIP: {
179          skip "no $test2_node in Hyper Estraier, skipping set_link", 5 unless (my $test2_label = $node2->label);          skip "no $test2_node in Hyper Estraier, skipping set_link", 5 unless (my $test2_label = $node2->label);
180    

Legend:
Removed from v.117  
changed lines
  Added in v.135

  ViewVC Help
Powered by ViewVC 1.1.26