/[wait]/trunk/t/table.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/table.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 114 by dpavlin, Tue Jul 13 21:27:27 2004 UTC revision 115 by dpavlin, Wed Jul 14 07:35:56 2004 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4    
5  use Test::More;  use Test::More;
6  use File::Path qw(rmtree);  #use blib;
 use blib;  
7    
8  BEGIN { use_ok('WAIT::Database'); }  BEGIN { use_ok('WAIT::Database'); }
9  END { system 'rm -rf test' if -d 'test'; }  END { system 'rm -rf test' if -d 'test'; }
10    
11  plan tests => 31;  plan tests => 17;
12    
13  ok(my $db = WAIT::Database->create(name => 'test'), "create");  ok(my $db = WAIT::Database->create(name => 'test'), "create");
14    
15  ok(my $tb = $db->create_table(name => 'sample', attr => ['docid', 'term']), "create_table");  ok(my $tb = $db->create_table(name => 'sample', attr => ['docid', 'term']), "create_table");
16    
 use Data::Dumper;  
 print Dumper($tb);  
   
17  ok($db->drop_table(name => 'sample'), "drop_table");  ok($db->drop_table(name => 'sample'), "drop_table");
18    
19  ok (!$tb->drop, "tb->drop");  ok($tb->drop, "tb->drop");
20    
21  ok ($tb = $db->create_table(name => 'sample', attr => ['docid', 'term']), "create_table");  ok($tb = $db->create_table(name => 'sample', attr => ['docid', 'term']), "create_table");
22    
23  ok($tb->open, "tb->open");  ok($tb->open, "tb->open");
24    

Legend:
Removed from v.114  
changed lines
  Added in v.115

  ViewVC Help
Powered by ViewVC 1.1.26