1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 22:28:47 -04:00

Wrap in Test::NoWarnings

This commit is contained in:
Adam Kennedy 2009-04-04 23:01:39 +00:00
parent 31996481e2
commit 199187bbfc

View file

@ -6,9 +6,11 @@ BEGIN {
$^W = 1; $^W = 1;
} }
use Test::More tests => 10; use Test::More tests => 11;
use Test::NoWarnings;
use t::lib::Test; use t::lib::Test;
SCOPE: {
my $dbh = connect_ok( RaiseError => 1 ); my $dbh = connect_ok( RaiseError => 1 );
$dbh->do("CREATE TABLE f (f1, f2, f3)"); $dbh->do("CREATE TABLE f (f1, f2, f3)");
$dbh->do("INSERT INTO f VALUES (?, ?, ?)", {}, 'foo', 'bar', 1); $dbh->do("INSERT INTO f VALUES (?, ?, ?)", {}, 'foo', 'bar', 1);
@ -22,9 +24,11 @@ isa_ok( $sth1, 'DBI::st' );
ok( $sth1->execute, '->execute ok' ); ok( $sth1->execute, '->execute ok' );
is_deeply( $sth1->fetchrow_arrayref, [ 'foo', 'bar', 1 ], 'Row 1 ok' ); is_deeply( $sth1->fetchrow_arrayref, [ 'foo', 'bar', 1 ], 'Row 1 ok' );
is_deeply( $sth1->fetchrow_arrayref, [ 'foo', 'bar', 2 ], 'Row 2 ok' ); is_deeply( $sth1->fetchrow_arrayref, [ 'foo', 'bar', 2 ], 'Row 2 ok' );
my $sth2 = $dbh->prepare_cached('SELECT * FROM f ORDER BY f3', {}, 3); my $sth2 = $dbh->prepare_cached('SELECT * FROM f ORDER BY f3', {}, 3);
isa_ok( $sth2, 'DBI::st' ); isa_ok( $sth2, 'DBI::st' );
ok( $sth2->execute, '->execute ok' ); ok( $sth2->execute, '->execute ok' );
is_deeply( $sth2->fetchrow_arrayref, [ 'foo', 'bar', 1 ], 'Row 1 ok' ); is_deeply( $sth2->fetchrow_arrayref, [ 'foo', 'bar', 1 ], 'Row 1 ok' );
is_deeply( $sth2->fetchrow_arrayref, [ 'foo', 'bar', 2 ], 'Row 2 ok' ); is_deeply( $sth2->fetchrow_arrayref, [ 'foo', 'bar', 2 ], 'Row 2 ok' );
ok( $sth2->finish, '->finish ok' ); ok( $sth2->finish, '->finish ok' );
}