3 |
use strict; |
use strict; |
4 |
use blib; |
use blib; |
5 |
|
|
6 |
my $tests = 272; |
my $tests = 279; |
7 |
|
|
8 |
use Test::More; |
use Test::More; |
9 |
use Test::Exception; |
use Test::Exception; |
157 |
my $id; |
my $id; |
158 |
ok($id = $node->uri_to_id( 'data0' ), "uri_to_id(data0)"); |
ok($id = $node->uri_to_id( 'data0' ), "uri_to_id(data0)"); |
159 |
|
|
160 |
|
throws_ok { $node->get_doc( 'foo') } qr/id must be number/, 'croak on non-number'; |
161 |
|
|
162 |
ok($doc = $node->get_doc( $id ), "get_doc($id) for edit"); |
ok($doc = $node->get_doc( $id ), "get_doc($id) for edit"); |
163 |
$doc->add_attr('foo', 'bar'); |
$doc->add_attr('foo', 'bar'); |
164 |
#diag Dumper($doc); |
#diag Dumper($doc); |
234 |
|
|
235 |
ok(my $hints = $nres->hints, 'hints'); |
ok(my $hints = $nres->hints, 'hints'); |
236 |
diag Dumper($hints) if ($debug); |
diag Dumper($hints) if ($debug); |
237 |
|
foreach my $h (qw/TIME DOCNUM VERSION NODE HIT WORDNUM/) { |
238 |
|
ok(defined( $nres->hint($h) ), "have hint $h"); |
239 |
|
} |
240 |
|
|
241 |
ok($node->_set_info, "refresh _set_info"); |
ok($node->_set_info, "refresh _set_info"); |
242 |
|
|