/[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 49 by dpavlin, Fri Jan 6 12:40:23 2006 UTC revision 50 by dpavlin, Fri Jan 6 12:48:14 2006 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use blib;  use blib;
5    
6  use Test::More tests => 77;  use Test::More tests => 79;
7  use Test::Exception;  use Test::Exception;
8  use Data::Dumper;  use Data::Dumper;
9    
# Line 59  for ( 1 .. 10 ) { Line 59  for ( 1 .. 10 ) {
59          #diag $doc->dump_draft;          #diag $doc->dump_draft;
60  }  }
61    
62  ok(my $id = $node->uri_to_id( 'data001' ), 'uri_to_id');  my $id;
63    ok($id = $node->uri_to_id( 'data001' ), "uri_to_id = $id");
 ok( $node->out_doc( $id ), "out_doc $id");  
64    
65  for ( 1 .. 5 ) {  for ( 1 .. 5 ) {
66          ok( $node->out_doc_by_uri( 'test' . $_ ), "out_doc_by_uri test$_");          ok( $node->out_doc_by_uri( 'test' . $_ ), "out_doc_by_uri test$_");
67  }  }
68    
69  $doc->add_attr('@uri', 'data001');  ok($doc = $node->get_doc( $id ), 'get_doc for edit');
70  $doc->add_attr('foo', 'bar');  $doc->add_attr('foo', 'bar');
71    #diag Dumper($doc);
72  ok( $node->edit_doc( $doc ), 'edit_doc');  ok( $node->edit_doc( $doc ), 'edit_doc');
73    
74    ok( $node->out_doc( $id ), "out_doc $id");
75    
76    ok( ! $node->edit_doc( $doc ), "edit removed");
77    
78  for ( 6 .. 10 ) {  for ( 6 .. 10 ) {
79          my $uri = 'test' . $_;          my $uri = 'test' . $_;
80          ok( my $id = $node->uri_to_id( $uri ), "uri_to_id $uri");          ok( my $id = $node->uri_to_id( $uri ), "uri_to_id $uri");

Legend:
Removed from v.49  
changed lines
  Added in v.50

  ViewVC Help
Powered by ViewVC 1.1.26