--- trunk/t/5_Node.t 2006/01/16 21:42:09 78 +++ trunk/t/5_Node.t 2006/01/26 15:29:20 92 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 97; +use Test::More tests => 98; use Test::Exception; use Data::Dumper; @@ -32,7 +32,7 @@ SKIP: { -skip "no $test1_node node in Hyper Estraier", 87, unless($node->name); +skip "no $test1_node node in Hyper Estraier", 88, unless($node->name); my @res = ( -1, 200 ); @@ -90,11 +90,11 @@ cmp_ok($node->cond_to_query( $cond ), 'eq' , 'phrase=girl&attr1=%40title%20STRINC%20Material&order=%40uri%20ASCD&max='.$max.'&wwidth=480&hwidth=96&awidth=96', 'cond_to_query'); -ok( my $nrec = $node->search( $cond, 0 ), 'search'); +ok( my $nres = $node->search( $cond, 0 ), 'search'); -isa_ok( $nrec, 'Search::Estraier::NodeResult' ); +isa_ok( $nres, 'Search::Estraier::NodeResult' ); -cmp_ok($nrec->doc_num, '==', $max, "doc_num = $max"); +cmp_ok($nres->doc_num, '==', $max, "doc_num = $max"); for ( 6 .. 10 ) { my $uri = 'test' . $_; @@ -109,6 +109,9 @@ ok( eq_hash( $k, $k2 ), "keywords"); } +ok(my $hints = $nres->hints, 'hints'); +diag Dumper($hints); + ok($node->_set_info, "refresh _set_info"); my $v; @@ -129,7 +132,7 @@ # croak_on_error ok(my $node2 = new Search::Estraier::Node( url => "http://localhost:1978/non-existant", croak_on_error => 1 ), "new non-existant"); -throws_ok { $node->name } qr/port/, 'croak on error'; +throws_ok { $node2->name } qr/404/, 'croak on error'; SKIP: { skip "no $test2_node in Hyper Estraier, skipping set_link", 2 unless (my $test1_label = $node1->label);