--- trunk/t/5_Node.t 2006/01/06 01:40:04 46 +++ trunk/t/5_Node.t 2006/01/06 12:40:23 49 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 52; +use Test::More tests => 77; use Test::Exception; use Data::Dumper; @@ -76,5 +76,18 @@ ok( my $id = $node->uri_to_id( $uri ), "uri_to_id $uri"); ok( $node->get_doc( $id ), "get_doc $id"); ok( $node->get_doc_by_uri( $uri ), "get_doc_by_uri $uri"); - ok( my $k = $node->etch_doc_by_uri( $uri ), "etch_doc_by_uri $uri"); + cmp_ok( $node->get_doc_attr( $id, '@uri' ), 'eq', $uri, "get_doc_attr $id"); + cmp_ok( $node->get_doc_attr_by_uri( $uri, '@uri' ), 'eq', $uri, "get_doc_attr $id"); + ok( my $k = $node->etch_doc( $id ), "etch_doc_by_uri $uri"); + ok( my $k2 = $node->etch_doc_by_uri( $uri ), "etch_doc_by_uri $uri"); + #diag Dumper($k, $k2); + ok( eq_hash( $k, $k2 ), "keywords"); } + +my $v; +ok($v = $node->name, "name: $v"); +ok($v = $node->label, "label: $v"); +ok($v = $node->doc_num, "doc_num: $v"); +ok($v = $node->word_num, "word_num: $v"); +ok($v = $node->size, "size: $v"); +