Blame t/rt_96050_db_filename_for_a_closed_database.t
|
Packit |
723767 |
#!/usr/bin/env perl
|
|
Packit |
723767 |
|
|
Packit |
723767 |
use strict;
|
|
Packit |
723767 |
BEGIN {
|
|
Packit |
723767 |
$| = 1;
|
|
Packit |
723767 |
$^W = 1;
|
|
Packit |
723767 |
}
|
|
Packit |
723767 |
|
|
Packit |
723767 |
use lib "t/lib";
|
|
Packit |
723767 |
use SQLiteTest;
|
|
Packit |
723767 |
use Test::More;
|
|
Packit |
723767 |
use Test::NoWarnings;
|
|
Packit |
723767 |
|
|
Packit |
723767 |
my $tests = 2;
|
|
Packit |
723767 |
plan tests => 1 + $tests * @CALL_FUNCS + 1;
|
|
Packit |
723767 |
|
|
Packit |
723767 |
my $dbh = connect_ok( RaiseError => 1, PrintError => 0 );
|
|
Packit |
723767 |
for my $func (@CALL_FUNCS) {
|
|
Packit |
723767 |
my $filename = eval { $dbh->$func('db_filename') };
|
|
Packit |
723767 |
ok !$@, "no filename (because it's in-memory); no error";
|
|
Packit |
723767 |
}
|
|
Packit |
723767 |
|
|
Packit |
723767 |
$dbh->disconnect;
|
|
Packit |
723767 |
|
|
Packit |
723767 |
for my $func (@CALL_FUNCS) {
|
|
Packit |
723767 |
my $filename = eval { $dbh->$func('db_filename') };
|
|
Packit |
723767 |
ok !$@ && !$filename, "got no error; no filename; and no segfault";
|
|
Packit |
723767 |
}
|