mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 14:48:32 -04:00
sqlite_ function should be tested using @CALL_FUNCS
This commit is contained in:
parent
cc34b2bd71
commit
82e4128321
1 changed files with 8 additions and 5 deletions
|
@ -7,18 +7,21 @@ BEGIN {
|
||||||
}
|
}
|
||||||
|
|
||||||
use t::lib::Test;
|
use t::lib::Test;
|
||||||
use Test::More tests => 4;
|
use Test::More;
|
||||||
use Test::NoWarnings;
|
use Test::NoWarnings;
|
||||||
|
|
||||||
|
my $tests = 2;
|
||||||
|
plan tests => 1 + $tests * @CALL_FUNCS + 1;
|
||||||
|
|
||||||
my $dbh = connect_ok( RaiseError => 1, PrintError => 0 );
|
my $dbh = connect_ok( RaiseError => 1, PrintError => 0 );
|
||||||
{
|
for my $func (@CALL_FUNCS) {
|
||||||
my $filename = eval { $dbh->sqlite_db_filename };
|
my $filename = eval { $dbh->$func('db_filename') };
|
||||||
ok !$@, "no filename (because it's in-memory); no error";
|
ok !$@, "no filename (because it's in-memory); no error";
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbh->disconnect;
|
$dbh->disconnect;
|
||||||
|
|
||||||
{
|
for my $func (@CALL_FUNCS) {
|
||||||
my $filename = eval { $dbh->sqlite_db_filename };
|
my $filename = eval { $dbh->$func('db_filename') };
|
||||||
ok !$@ && !$filename, "got no error; no filename; and no segfault";
|
ok !$@ && !$filename, "got no error; no filename; and no segfault";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue