mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 14:48:32 -04:00
DBD-SQLite: fixed 32_inactive_error test to get a proper warning
This commit is contained in:
parent
0a29d5e86d
commit
906756fee5
1 changed files with 2 additions and 1 deletions
|
@ -9,7 +9,7 @@ BEGIN {
|
||||||
use Test::More tests => 4;
|
use Test::More tests => 4;
|
||||||
use t::lib::Test;
|
use t::lib::Test;
|
||||||
|
|
||||||
my $dbh = connect_ok( PrintError => 0, RaiseError => 1 );
|
my $dbh = connect_ok( PrintError => 1, RaiseError => 1 );
|
||||||
|
|
||||||
my $sth = $dbh->prepare('CREATE TABLE foo (f)');
|
my $sth = $dbh->prepare('CREATE TABLE foo (f)');
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ my @warning = ();
|
||||||
SCOPE: {
|
SCOPE: {
|
||||||
local $SIG{__WARN__} = sub { push @warning, @_; return };
|
local $SIG{__WARN__} = sub { push @warning, @_; return };
|
||||||
my $ret = eval { $sth->execute; };
|
my $ret = eval { $sth->execute; };
|
||||||
|
# we need PrintError => 1, or warn $@ if $@;
|
||||||
ok ! defined $ret;
|
ok ! defined $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue