From 906756fee5539aad684b7f986ded4c308644ac46 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Thu, 9 Apr 2009 04:32:32 +0000 Subject: [PATCH] DBD-SQLite: fixed 32_inactive_error test to get a proper warning --- t/32_inactive_error.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/32_inactive_error.t b/t/32_inactive_error.t index fb78b91..2cd60df 100644 --- a/t/32_inactive_error.t +++ b/t/32_inactive_error.t @@ -9,7 +9,7 @@ BEGIN { use Test::More tests => 4; 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)'); @@ -20,6 +20,7 @@ my @warning = (); SCOPE: { local $SIG{__WARN__} = sub { push @warning, @_; return }; my $ret = eval { $sth->execute; }; + # we need PrintError => 1, or warn $@ if $@; ok ! defined $ret; }