1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
|
|
3 |
use Test::More tests => 25; |
use Test::More tests => 26; |
4 |
use Test::Exception; |
use Test::Exception; |
5 |
use Cwd qw/abs_path/; |
use Cwd qw/abs_path/; |
6 |
use blib; |
use blib; |
20 |
|
|
21 |
diag "NULL DB"; |
diag "NULL DB"; |
22 |
|
|
23 |
ok($db = new WebPAC::DB( debug => $debug ), "new"); |
ok($db = new WebPAC::DB( debug => $debug, no_log => 1, ), "new"); |
24 |
|
|
25 |
ok(! $db->path, "path"); |
ok(! $db->path, "path"); |
26 |
|
|
36 |
|
|
37 |
diag "DB path: $path"; |
diag "DB path: $path"; |
38 |
|
|
39 |
ok($db = new WebPAC::DB( path => $path, debug => $debug ), "new"); |
ok($db = new WebPAC::DB( path => $path, debug => $debug, no_log => 1 ), "new"); |
40 |
|
|
41 |
cmp_ok($db->{'path'}, 'eq', $path, "path"); |
cmp_ok($db->{'path'}, 'eq', $path, "path"); |
42 |
|
|
80 |
|
|
81 |
is_deeply(\@ds, \@ds2, "loaded data"); |
is_deeply(\@ds, \@ds2, "loaded data"); |
82 |
|
|
83 |
|
ok(! $db->load_ds({ '000' => 42 }), "load_ds non-existing"); |
84 |
|
|
85 |
undef $db; |
undef $db; |
86 |
|
|