/[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 41 by dpavlin, Thu Jan 5 23:32:31 2006 UTC revision 45 by dpavlin, Fri Jan 6 01:36:09 2006 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use blib;  use blib;
5    
6  use Test::More tests => 34;  use Test::More tests => 46;
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 $test_node = 'Search-Estraier';  my $test_node = 'Search-Estraier';
# Line 57  for ( 1 .. 10 ) { Line 57  for ( 1 .. 10 ) {
57          #diag $doc->dump_draft;          #diag $doc->dump_draft;
58  }  }
59    
60  ok( $node->out_doc( 0 ), 'out_doc');  ok(my $id = $node->uri_to_id( 'data001' ), 'uri_to_id');
61    
62  for ( 1 .. 10 ) {  ok( $node->out_doc( $id ), "out_doc $id");
63          ok( $node->out_doc_by_uri( 'test' .$_ ), "out_doc_by_uri test$_");  
64    for ( 1 .. 5 ) {
65            ok( $node->out_doc_by_uri( 'test' . $_ ), "out_doc_by_uri test$_");
66    }
67    
68    $doc->add_attr('@uri', 'data001');
69    $doc->add_attr('foo', 'bar');
70    ok( $node->edit_doc( $doc ), 'edit_doc');
71    
72    for ( 6 .. 10 ) {
73            ok( $node->get_doc( $_ ), "get_doc $_");
74            my $uri = 'test' . $_;
75            ok( $node->get_doc_by_uri( $uri ), "get_doc_by_uri $uri");
76            ok( my $k = $node->etch_doc_by_uri( $uri ), "etch_doc_by_uri $uri");
77  }  }

Legend:
Removed from v.41  
changed lines
  Added in v.45

  ViewVC Help
Powered by ViewVC 1.1.26