--- trunk/t/5_Node.t 2006/01/28 19:41:59 100 +++ trunk/t/5_Node.t 2006/01/28 20:44:15 103 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 99; +use Test::More tests => 101; use Test::Exception; use Data::Dumper; @@ -102,7 +102,7 @@ for ( 6 .. 10 ) { my $uri = 'test' . $_; - ok( my $id = $node->uri_to_id( $uri ), "uri_to_id $uri"); + ok( my $id = $node->uri_to_id( $uri ), "uri_to_id($uri) = $id"); ok( $node->get_doc( $id ), "get_doc $id"); ok( $node->get_doc_by_uri( $uri ), "get_doc_by_uri $uri"); cmp_ok( $node->get_doc_attr( $id, '@uri' ), 'eq', $uri, "get_doc_attr $id"); @@ -138,8 +138,10 @@ ok($node = new Search::Estraier::Node( url => "http://localhost:1978/non-existant", croak_on_error => 1 ), "new non-existant"); throws_ok { $node->name } qr/404/, 'croak on error'; -# support for undef and 0 values -#ok($node = new Search::Estraier::Node( url => "http://localhost:1978/$test1_node", croak_on_error => 1 ), "new $test1_node"); +# croak_on_error +ok($node = new Search::Estraier::Node( url => "http://localhost:1978/$test1_node", croak_on_error => 1 ), "new $test1_node"); + +ok(! $node->uri_to_id('foobar'), 'uri_to_id without croak'); SKIP: { skip "no $test2_node in Hyper Estraier, skipping set_link", 2 unless (my $test2_label = $node2->label);