mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
DBD-SQLite: added a test; execute on inactive error should return undef, not 0
This commit is contained in:
parent
e674c69e0f
commit
583abd817e
1 changed files with 20 additions and 0 deletions
20
t/32_inactive_error.t
Normal file
20
t/32_inactive_error.t
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
BEGIN {
|
||||
$| = 1;
|
||||
$^W = 1;
|
||||
}
|
||||
|
||||
use Test::More tests => 2;
|
||||
use t::lib::Test;
|
||||
|
||||
my $dbh = connect_ok( PrintError => 0, RaiseError => 1 );
|
||||
|
||||
my $sth = $dbh->prepare('CREATE TABLE foo (f)');
|
||||
$dbh->disconnect;
|
||||
|
||||
# attempt to execute on inactive database handle
|
||||
my $ret = eval { $sth->execute; };
|
||||
|
||||
ok !defined $ret;
|
Loading…
Add table
Reference in a new issue