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

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

revision 111 by dpavlin, Tue Jul 13 19:05:31 2004 UTC revision 112 by dpavlin, Tue Jul 13 19:50:13 2004 UTC
# Line 6  use strict; Line 6  use strict;
6  use Test::More;  use Test::More;
7  use Test::Exception;  use Test::Exception;
8  use File::Path qw(rmtree);  use File::Path qw(rmtree);
 use lib '/data/wait2/lib';  
9  use blib;  use blib;
10    
11  BEGIN { use_ok('WAIT::Database'); }  BEGIN { use_ok('WAIT::Database'); }
12    
13  plan tests => 10;  plan tests => 12;
14    
15  my $db;  my $db;
16    
# Line 30  ok($db = WAIT::Database->open(name => 't Line 29  ok($db = WAIT::Database->open(name => 't
29    
30  ok(!$db->sync, "sync without tables");  ok(!$db->sync, "sync without tables");
31    
32  # can't test this  undef $WAIT::Database::self;
33  #undef $WAIT::Database::self;  ok(!defined($WAIT::Database::self) , 'undef distroy');
 #ok(!defined($WAIT::Database::self) , 'undef $WAIT::Database::self');  
34    
35    $db = WAIT::Database->open(name => 'test');
36    undef $db;
37    ok(!defined($db), 'undef obj');
38    
39    $db = WAIT::Database->open(name => 'test');
40  ok($db->dispose, "dispose");  ok($db->dispose, "dispose");
41    
42  ok(! $db, '$db empty');  ok(!defined($db), '$db empty');
43    
44  {  {
45          my $db = WAIT::Database->create(name => 'test');          my $db = WAIT::Database->create(name => 'test');

Legend:
Removed from v.111  
changed lines
  Added in v.112

  ViewVC Help
Powered by ViewVC 1.1.26