diff --git a/t/01_compile.t b/t/01_compile.t index cd5a802..fc2974a 100644 --- a/t/01_compile.t +++ b/t/01_compile.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More; use lib "t/lib"; @@ -17,3 +17,5 @@ if (my @compile_options = DBD::SQLite::compile_options()) { diag("Compile Options:"); diag(join "", map { " $_\n" } @compile_options); } + +done_testing; diff --git a/t/02_logon.t b/t/02_logon.t index ab76385..1733823 100644 --- a/t/02_logon.t +++ b/t/02_logon.t @@ -7,8 +7,6 @@ use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; use Test::NoWarnings; -plan tests => 20 * @CALL_FUNCS + 1; - my $show_diag = 0; foreach my $call_func (@CALL_FUNCS) { @@ -59,3 +57,5 @@ foreach my $call_func (@CALL_FUNCS) { isa_ok( $dbh, 'DBI::db' ); } } + +done_testing; diff --git a/t/03_create_table.t b/t/03_create_table.t index 89badb6..cf93c8a 100644 --- a/t/03_create_table.t +++ b/t/03_create_table.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 7; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok(); @@ -28,3 +28,5 @@ ok( $sth->execute, '->execute ok' ); my $names = $sth->{NAME}; is( scalar(@$names), 4, 'Got 4 columns' ); is_deeply( $names, [ 'f1', 'f1', 'f2', 'f3' ], 'Table prepending is disabled by default' ); + +done_testing; diff --git a/t/04_insert.t b/t/04_insert.t index a86aba6..e9eca0c 100644 --- a/t/04_insert.t +++ b/t/04_insert.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 14; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok(); @@ -34,3 +34,5 @@ SCOPE: { } is( $dbh->do("delete from f where f1='test'"), 3 ); + +done_testing; diff --git a/t/05_select.t b/t/05_select.t index 40779a9..614a7db 100644 --- a/t/05_select.t +++ b/t/05_select.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 22; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok( RaiseError => 1 ); @@ -55,3 +55,5 @@ while ($row = $sth->fetch) { ok($num_rows == 1); $sth->finish; $dbh->do("delete from f where f1='test'"); + +done_testing; diff --git a/t/06_tran.t b/t/06_tran.t index ca45e58..ac3af11 100644 --- a/t/06_tran.t +++ b/t/06_tran.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 6; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok( @@ -48,3 +48,5 @@ $dbh->rollback; ); ok !$dbh->{sqlite_use_immediate_transaction}, "sqlite_use_immediate_transaction is false if you set explicitly"; } + +done_testing; diff --git a/t/07_error.t b/t/07_error.t index 121786d..39466d6 100644 --- a/t/07_error.t +++ b/t/07_error.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 8; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok( RaiseError => 1, PrintError => 0 ); @@ -24,3 +24,5 @@ eval { ok($@, 'Statement 2 generated an error'); is( $DBI::err, 19, '$DBI::err ok' ); like( $DBI::errstr, qr/column a is not unique|UNIQUE constraint failed/, '$DBI::errstr ok' ); + +done_testing; diff --git a/t/08_busy.t b/t/08_busy.t index f7f9182..920c116 100644 --- a/t/08_busy.t +++ b/t/08_busy.t @@ -7,8 +7,6 @@ use SQLiteTest qw/connect_ok dbfile @CALL_FUNCS/; use Test::More; use Test::NoWarnings; -plan tests => 11 * @CALL_FUNCS + 1; - foreach my $call_func (@CALL_FUNCS) { my $dbh = connect_ok( @@ -119,3 +117,5 @@ foreach my $call_func (@CALL_FUNCS) { unlink $dbfile; } } + +done_testing; diff --git a/t/09_create_function.t b/t/09_create_function.t index a2a430c..2c07884 100644 --- a/t/09_create_function.t +++ b/t/09_create_function.t @@ -13,8 +13,6 @@ if ($DBD::SQLite::sqlite_version_number >= 3008003) { push @function_flags, DBD::SQLite::Constants::SQLITE_DETERMINISTIC; } -plan tests => 29 * @CALL_FUNCS * @function_flags + 1; - sub now { return time(); } @@ -130,3 +128,5 @@ foreach my $call_func (@CALL_FUNCS) { for my $flags (@function_flags) { $dbh->disconnect; }} + +done_testing; diff --git a/t/10_create_aggregate.t b/t/10_create_aggregate.t index f2455d9..828baea 100644 --- a/t/10_create_aggregate.t +++ b/t/10_create_aggregate.t @@ -12,8 +12,6 @@ if ($DBD::SQLite::sqlite_version_number >= 3008003) { push @function_flags, DBD::SQLite::Constants::SQLITE_DETERMINISTIC; } -plan tests => 21 * @CALL_FUNCS * @function_flags + 1; - # Create the aggregate test packages SCOPE: { package count_aggr; @@ -134,3 +132,5 @@ foreach my $call_func (@CALL_FUNCS) { for my $flags (@function_flags) { $dbh->disconnect; }} + +done_testing; diff --git a/t/11_get_info.t b/t/11_get_info.t index 84efb9c..93990dd 100644 --- a/t/11_get_info.t +++ b/t/11_get_info.t @@ -35,8 +35,6 @@ my %info = ( SQL_TABLE_TERM => 'table', ); -plan tests => scalar(keys %info) + 2; - my $dbh = connect_ok( RaiseError => 1 ); foreach my $option ( sort keys %info ) { @@ -47,3 +45,5 @@ foreach my $option ( sort keys %info ) { } $dbh->disconnect; + +done_testing; diff --git a/t/12_unicode.t b/t/12_unicode.t index 7ac4819..f83291d 100644 --- a/t/12_unicode.t +++ b/t/12_unicode.t @@ -7,9 +7,7 @@ use lib "t/lib"; use SQLiteTest; use Test::More; BEGIN { - if ( $] >= 5.008005 ) { - plan( tests => 26 ); - } else { + unless ( $] >= 5.008005 ) { plan( skip_all => 'Unicode is not supported before 5.8.5' ); } } @@ -131,3 +129,5 @@ sub database_roundtrip { croak "Bad row length ".@row unless (@row == 2); @row; } + +done_testing; diff --git a/t/13_create_collation.t b/t/13_create_collation.t index fbaff66..c689aab 100644 --- a/t/13_create_collation.t +++ b/t/13_create_collation.t @@ -4,13 +4,7 @@ use lib "t/lib"; use SQLiteTest qw/connect_ok dies @CALL_FUNCS/; use Test::More; BEGIN { - my $COLLATION_TESTS = 10; - my $WRITE_ONCE_TESTS = 4; - - if ( $] >= 5.008005 ) { - plan( tests => $COLLATION_TESTS * @CALL_FUNCS + - $WRITE_ONCE_TESTS + 1); - } else { + unless ( $] >= 5.008005 ) { plan( skip_all => 'Unicode is not supported before 5.8.5' ); } } @@ -128,3 +122,5 @@ foreach my $call_func (@CALL_FUNCS) { "collate by_length (@sorted // @$db_sorted)"); } } + +done_testing; diff --git a/t/14_progress_handler.t b/t/14_progress_handler.t index 6ed7f61..96f8f08 100644 --- a/t/14_progress_handler.t +++ b/t/14_progress_handler.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; use Test::NoWarnings; -plan tests => 5 * @CALL_FUNCS + 1; - my $N_OPCODES = 50; # how many opcodes before calling the progress handler # our progress_handler just remembers how many times it was called @@ -48,3 +46,5 @@ foreach my $call_func (@CALL_FUNCS) { $dbh->disconnect; } + +done_testing; diff --git a/t/15_ak_dbd.t b/t/15_ak_dbd.t index 4524f66..4fd6968 100644 --- a/t/15_ak_dbd.t +++ b/t/15_ak_dbd.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 37; +use Test::More; use Test::NoWarnings; # Create a database @@ -130,3 +130,5 @@ SCOPE: { my $sth = $dbh->prepare("UPDATE one SET id = 3 WHERE name = 'Gary Shea'"); isa_ok( $sth, 'DBI::st' ); } + +done_testing; diff --git a/t/16_column_info.t b/t/16_column_info.t index 95039c3..4832ae5 100644 --- a/t/16_column_info.t +++ b/t/16_column_info.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 12; +use Test::More; use Test::NoWarnings; my $dbh = DBI->connect('dbi:SQLite:dbname=:memory:',undef,undef,{RaiseError => 1}); @@ -75,3 +75,5 @@ SKIP: { # 11. Correct info retrieved is_deeply( \@info, $expected, 'We got the right info from multiple databases' ); } + +done_testing; diff --git a/t/17_createdrop.t b/t/17_createdrop.t index b40a805..b4cae86 100644 --- a/t/17_createdrop.t +++ b/t/17_createdrop.t @@ -5,7 +5,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 4; +use Test::More; use Test::NoWarnings; # Create a database @@ -21,3 +21,5 @@ END_SQL # Drop the table ok( $dbh->do('DROP TABLE one'), 'DROP TABLE' ); + +done_testing; diff --git a/t/18_insertfetch.t b/t/18_insertfetch.t index d7f3104..3d26762 100644 --- a/t/18_insertfetch.t +++ b/t/18_insertfetch.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 10; +use Test::More; use Test::NoWarnings; # Create a database @@ -41,3 +41,5 @@ SCOPE: { my $row2 = $sth->fetchrow_arrayref; is( $row2, undef, 'fetch empty statement handler' ); } + +done_testing; diff --git a/t/19_bindparam.t b/t/19_bindparam.t index a533a2e..107ae06 100644 --- a/t/19_bindparam.t +++ b/t/19_bindparam.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 39; +use Test::More; use Test::NoWarnings; use DBI ':sql_types'; @@ -81,3 +81,5 @@ SCOPE: { is( $id, 6, 'id = 6' ); is( $name, 'Larry', 'name = Larry' ); } + +done_testing; diff --git a/t/20_blobs.t b/t/20_blobs.t index 259de8f..68e9cf1 100644 --- a/t/20_blobs.t +++ b/t/20_blobs.t @@ -5,7 +5,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 17; +use Test::More; use Test::NoWarnings; use DBI ':sql_types'; @@ -81,3 +81,5 @@ SCOPE: { ], 'Got the blob back ok' ); ok( $sth->finish, '->finish' ); } + +done_testing; diff --git a/t/21_blobtext.t b/t/21_blobtext.t index 3d3251c..ea4ce4c 100644 --- a/t/21_blobtext.t +++ b/t/21_blobtext.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 27; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok( @@ -74,3 +74,5 @@ sub dumpblob { } if ($ENV{SHOW_BLOBS}) { close(OUT) } } + +done_testing; diff --git a/t/22_listfields.t b/t/22_listfields.t index 91dbc1b..713ac1c 100644 --- a/t/22_listfields.t +++ b/t/22_listfields.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 12; +use Test::More; use Test::NoWarnings; # Create a database @@ -40,3 +40,5 @@ SCOPE: { is( $sth->{NUM_OF_FIELDS}, 0, 'No fields in statement' ); ok( $sth->finish, '->finish ok' ); } + +done_testing; diff --git a/t/23_nulls.t b/t/23_nulls.t index 1f9ff31..e295204 100644 --- a/t/23_nulls.t +++ b/t/23_nulls.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 9; +use Test::More; # Create a database my $dbh = connect_ok(); @@ -34,3 +34,5 @@ SCOPE: { is( $row->[1], 'NULL-valued id', 'Second column is defined' ); ok( $sth->finish, '->finish' ); } + +done_testing; diff --git a/t/24_numrows.t b/t/24_numrows.t index 5768e77..88cda5c 100644 --- a/t/24_numrows.t +++ b/t/24_numrows.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 18; +use Test::More; use Test::NoWarnings; sub rows { @@ -72,3 +72,5 @@ SCOPE: { rows( $sth, 2 ); ok( $sth->finish, '->finish' ); } + +done_testing; diff --git a/t/25_chopblanks.t b/t/25_chopblanks.t index 062a0d0..be9f8a6 100644 --- a/t/25_chopblanks.t +++ b/t/25_chopblanks.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 14; +use Test::More; use Test::NoWarnings; # Create a database @@ -61,3 +61,5 @@ SCOPE: { ], 'ChopBlanks = 1' ); ok( $sth->finish, '->finish' ); } + +done_testing; diff --git a/t/26_commit.t b/t/26_commit.t index 1e75c73..2299675 100644 --- a/t/26_commit.t +++ b/t/26_commit.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 28; +use Test::More; # use Test::NoWarnings; my $warning_count = 0; @@ -107,3 +107,5 @@ SCOPE: { $SIG{__WARN__} = 'DEFAULT'; is( $warning_count, 2, 'Got one warning' ); } + +done_testing; diff --git a/t/27_metadata.t b/t/27_metadata.t index f14dd16..76a4911 100644 --- a/t/27_metadata.t +++ b/t/27_metadata.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 21; +use Test::More; use lib "t/lib"; use SQLiteTest; @@ -51,3 +51,5 @@ isnt $types->[0], 'VARCHAR(2)', '$sth->{TYPE}[0] doesn\'t return a string'; isnt $types->[1], 'CHAR(1)', '$sth->{TYPE}[1] doesn\'t return a string'; like $types->[0], qr/^-?\d+$/, '$sth->{TYPE}[0] returns an integer'; like $types->[1], qr/^-?\d+$/, '$sth->{TYPE}[1] returns an integer'; + +done_testing; diff --git a/t/28_schemachange.t b/t/28_schemachange.t index b4cc618..27d5616 100644 --- a/t/28_schemachange.t +++ b/t/28_schemachange.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More; use lib "t/lib"; use SQLiteTest; @@ -53,3 +53,5 @@ SCOPE: { ok( $dbh->do($create2), $create2 ) or diag("Error: '$DBI::errstr'"); ok( $dbh->disconnect, '->disconnect ok' ); } + +done_testing; diff --git a/t/30_auto_rollback.t b/t/30_auto_rollback.t index cc0f3bc..07b3ff1 100644 --- a/t/30_auto_rollback.t +++ b/t/30_auto_rollback.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 6; +use Test::More; use Test::NoWarnings; SCOPE: { @@ -17,3 +17,5 @@ SCOPE: { 'INSERT ok', ); } + +done_testing; diff --git a/t/31_bind_weird_number_param.t b/t/31_bind_weird_number_param.t index fbc0b36..95ed900 100644 --- a/t/31_bind_weird_number_param.t +++ b/t/31_bind_weird_number_param.t @@ -3,7 +3,7 @@ use warnings; my @to_be_tested; BEGIN { @to_be_tested = (1.23E4); } -use Test::More tests => 2 + @to_be_tested; +use Test::More; use lib "t/lib"; use SQLiteTest; @@ -19,3 +19,5 @@ SCOPE: { ok( (@$av && $av->[0] == $to_be_tested[$id]), "accepts $to_be_tested[$id]: ".$av->[0]); } } + +done_testing; diff --git a/t/32_inactive_error.t b/t/32_inactive_error.t index f3d57c3..2944390 100644 --- a/t/32_inactive_error.t +++ b/t/32_inactive_error.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More; use lib "t/lib"; use SQLiteTest; @@ -42,3 +42,5 @@ like( qr/attempt to fetch on inactive database handle/, 'Got the expected warning', ); + +done_testing; diff --git a/t/33_non_latin_path.t b/t/33_non_latin_path.t index 29d455f..6cee773 100644 --- a/t/33_non_latin_path.t +++ b/t/33_non_latin_path.t @@ -7,9 +7,7 @@ use lib "t/lib"; use SQLiteTest; use Test::More; BEGIN { - if ( $] >= 5.008005 ) { - plan( tests => 2 + 12 * (($^O eq 'cygwin') ? 2 : 4) ); - } else { + unless ( $] >= 5.008005 ) { plan( skip_all => 'Unicode is not supported before 5.8.5' ); } } @@ -127,3 +125,5 @@ sub _path { # copied from DBD::SQLite::connect } return $path; } + +done_testing; diff --git a/t/34_online_backup.t b/t/34_online_backup.t index efa5fbb..867e1b6 100644 --- a/t/34_online_backup.t +++ b/t/34_online_backup.t @@ -10,8 +10,6 @@ BEGIN { requires_sqlite('3.6.11') } use Test::NoWarnings; use DBI; -plan tests => 11 * @CALL_FUNCS + 1; - foreach my $call_func (@CALL_FUNCS) { # Connect to the test db and add some stuff: my $foo = connect_ok( dbfile => 'foo', RaiseError => 1 ); @@ -109,3 +107,5 @@ foreach my $call_func (@CALL_FUNCS) { $foo->disconnect; } + +done_testing; diff --git a/t/35_table_info.t b/t/35_table_info.t index ed39d76..bac76dc 100644 --- a/t/35_table_info.t +++ b/t/35_table_info.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 22; +use Test::More; use Test::NoWarnings; my @catalog_info = ( @@ -139,3 +139,5 @@ is_deeply $info, [$table2_info, @systable_info, $table4_info, $table3_info, $tab #warn 'Schema Names', substr Dumper($dbh->table_info('', '%', '')->fetchall_arrayref), 5; #warn 'Table Types', substr Dumper($dbh->table_info('', '', '', '%')->fetchall_arrayref), 5; #warn 'table_info', substr Dumper($info), 5; + +done_testing; diff --git a/t/36_hooks.t b/t/36_hooks.t index 66ecb76..3e23a72 100644 --- a/t/36_hooks.t +++ b/t/36_hooks.t @@ -7,8 +7,6 @@ use Test::NoWarnings qw/had_no_warnings clear_warnings/; use DBD::SQLite; -plan tests => 24 * @CALL_FUNCS + 1; - # hooks : just count the commits / rollbacks / updates my ($n_commits, $n_rollbacks, $n_updates, @update_args); sub commit_hook { $n_commits += 1; return 0; } @@ -143,3 +141,5 @@ sub do_transaction { } $dbh->commit; } + +done_testing; diff --git a/t/37_regexp.t b/t/37_regexp.t index eeae6d5..45514cd 100644 --- a/t/37_regexp.t +++ b/t/37_regexp.t @@ -19,8 +19,6 @@ BEGIN { } } -plan tests => 2 * (3 + 2 * @regexes) * @CALL_FUNCS; - BEGIN { # Sadly perl for windows (and probably sqlite, too) may hang # if the system locale doesn't support european languages. @@ -83,3 +81,5 @@ foreach my $call_func (@CALL_FUNCS) { } } } + +done_testing; diff --git a/t/38_empty_statement.t b/t/38_empty_statement.t index 1686252..82f3862 100644 --- a/t/38_empty_statement.t +++ b/t/38_empty_statement.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok/; use Test::More; use Test::NoWarnings; -plan tests => 8; - my $dbh = connect_ok( RaiseError => 1 ); eval { $dbh->do("\n") }; @@ -32,3 +30,5 @@ diag $@ if $@; eval { $dbh->do(undef) }; ok !$@, "undef statement does not spit a warning, and does not die anyway"; diag $@ if $@; + +done_testing; diff --git a/t/39_foreign_keys.t b/t/39_foreign_keys.t index e737167..d41e28e 100644 --- a/t/39_foreign_keys.t +++ b/t/39_foreign_keys.t @@ -8,8 +8,6 @@ BEGIN { requires_sqlite('3.6.19') } use Test::NoWarnings; -plan tests => 17; - # following tests are from http://www.sqlite.org/foreignkeys.html my $dbh = connect_ok( RaiseError => 1, PrintError => 0, AutoCommit => 1 ); @@ -71,3 +69,5 @@ sub insert_track { _do("INSERT INTO track (trackid, trackname, trackartist) VAL sub update_track { _do("UPDATE track SET trackartist = ? WHERE trackname = ?", @_); } sub _do { eval { $dbh->do(shift, undef, @_) }; } + +done_testing; diff --git a/t/40_multiple_statements.t b/t/40_multiple_statements.t index c86a67e..a4db0d5 100644 --- a/t/40_multiple_statements.t +++ b/t/40_multiple_statements.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok/; use Test::More; use Test::NoWarnings; -plan tests => 21; - { # DBD::SQLite prepares/does the first statement only; # the following statements will be discarded silently. @@ -126,3 +124,5 @@ plan tests => 21; ok $got->[0][0] == 1 && $got->[1][0] == 2, "and got the inserted values"; } + +done_testing; diff --git a/t/41_placeholders.t b/t/41_placeholders.t index e9f3976..4386a70 100644 --- a/t/41_placeholders.t +++ b/t/41_placeholders.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok/; use Test::More; use Test::NoWarnings; -plan tests => 13; - my $dbh = connect_ok( RaiseError => 1 ); ok $dbh->do('create table foo (id integer, value integer)'); @@ -52,3 +50,5 @@ SKIP: { ok $count == 2; } + +done_testing; diff --git a/t/42_primary_key_info.t b/t/42_primary_key_info.t index 9a36392..be8a44b 100644 --- a/t/42_primary_key_info.t +++ b/t/42_primary_key_info.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok/; use Test::More; use Test::NoWarnings; -plan tests => (5 * 5) + (3 * 6 + 1) + (5 * 2) + 1; - for my $quote ('', qw/' " ` []/) { my ($begin_quote, $end_quote) = (substr($quote, 0, 1), substr($quote, -1, 1)); my $dbh = connect_ok( RaiseError => 1 ); @@ -113,3 +111,5 @@ for my $quote ('', qw/' " ` []/) { is $pk_info[0]{PK_NAME} => 'bar', "pk name is correct"; } } + +done_testing; diff --git a/t/43_fts3.t b/t/43_fts3.t index 36d010d..da818de 100644 --- a/t/43_fts3.t +++ b/t/43_fts3.t @@ -37,11 +37,6 @@ BEGIN { # Perl may spit a warning on locale # use Test::NoWarnings; -my $num = has_sqlite('3.7.4') ? 4 : 2; - -plan tests => $num * @tests # each test with unicode y/n and with fts3/fts4 - + 2; # connect_ok with unicode y/n - BEGIN { # Sadly perl for windows (and probably sqlite, too) may hang # if the system locale doesn't support european languages. @@ -112,3 +107,5 @@ for my $use_unicode (0, 1) { } } } + +done_testing; diff --git a/t/44_rtree.t b/t/44_rtree.t index 1c41b34..17cfadb 100644 --- a/t/44_rtree.t +++ b/t/44_rtree.t @@ -54,8 +54,6 @@ BEGIN { } use Test::NoWarnings; -plan tests => @coords + (2 * @test_regions) + 4; - # connect my $dbh = connect_ok( RaiseError => 1 ); @@ -106,3 +104,5 @@ for my $region (@test_regions) { my $results = $dbh->selectcol_arrayref($overlap_sql, undef, @$region); is_deeply_approx($results, shift @test_results); } + +done_testing; diff --git a/t/45_savepoints.t b/t/45_savepoints.t index 87e1ef3..d146bab 100644 --- a/t/45_savepoints.t +++ b/t/45_savepoints.t @@ -6,7 +6,6 @@ use Test::More; BEGIN { requires_sqlite('3.6.8') } -plan tests => 5; use Test::NoWarnings; my $dbh = connect_ok( @@ -41,3 +40,5 @@ is $dbh->selectrow_array("SELECT COUNT(*) FROM MST"), 0, "savepoint rolled back"; $dbh->rollback; + +done_testing; diff --git a/t/46_mod_perl.t b/t/46_mod_perl.t index 8863852..bc15bfe 100644 --- a/t/46_mod_perl.t +++ b/t/46_mod_perl.t @@ -8,9 +8,6 @@ BEGIN { if ($@) { plan skip_all => 'requires APR::Table'; } - else { - plan tests => 2; - } } my $dbh = connect_ok( @@ -21,3 +18,5 @@ my $dbh = connect_ok( eval { $dbh->do('SELECT 1') }; ok !$@, "no errors"; diag $@ if $@; + +done_testing; diff --git a/t/47_execute.t b/t/47_execute.t index 43206c0..c6d6bbb 100644 --- a/t/47_execute.t +++ b/t/47_execute.t @@ -7,8 +7,6 @@ use SQLiteTest qw/connect_ok dbfile @CALL_FUNCS/; use Test::More; use Test::NoWarnings; -plan tests => 10 * @CALL_FUNCS + 1; - foreach my $call_func (@CALL_FUNCS) { my $dbh = connect_ok( @@ -77,3 +75,5 @@ foreach my $call_func (@CALL_FUNCS) { unlink $dbfile; } + +done_testing; diff --git a/t/48_bind_param_is_sticky.t b/t/48_bind_param_is_sticky.t index 9184a55..117f4c7 100644 --- a/t/48_bind_param_is_sticky.t +++ b/t/48_bind_param_is_sticky.t @@ -8,8 +8,6 @@ use DBI qw(:sql_types); use Test::More; use Test::NoWarnings; -plan tests => 10 + 1; - my $dbh = connect_ok( RaiseError => 1, PrintError => 0, @@ -41,3 +39,5 @@ $dbh->commit; $dbh->disconnect; undef($dbh); + +done_testing; diff --git a/t/49_trace_and_profile.t b/t/49_trace_and_profile.t index f97060d..6b6bc08 100644 --- a/t/49_trace_and_profile.t +++ b/t/49_trace_and_profile.t @@ -8,8 +8,6 @@ BEGIN { requires_sqlite('3.6.21') } use Test::NoWarnings; -plan tests => 12 * @CALL_FUNCS + 1; - my $flag = 0; for my $call_func (@CALL_FUNCS) { my $dbh = connect_ok(); @@ -57,3 +55,5 @@ for my $call_func (@CALL_FUNCS) { is $profile[2][0] => "insert into bar values (?)"; like $profile[2][1] => qr/^[0-9]+$/; } + +done_testing; diff --git a/t/50_foreign_key_info.t b/t/50_foreign_key_info.t index a719f30..f3f9089 100644 --- a/t/50_foreign_key_info.t +++ b/t/50_foreign_key_info.t @@ -52,8 +52,6 @@ CREATE TABLE song( ); __EOSQL__ -plan tests => @sql_statements + 22; - my $dbh = connect_ok( RaiseError => 1, PrintError => 0, AutoCommit => 1 ); my $sth; my $fk_data; @@ -114,3 +112,5 @@ for ($fk_data->{songartist}) { for ($fk_data->{songalbum}) { is($_->{KEY_SEQ}, 2, "FK song, key seq 2"); } + +done_testing; diff --git a/t/51_table_column_metadata.t b/t/51_table_column_metadata.t index 831d69c..d94b471 100644 --- a/t/51_table_column_metadata.t +++ b/t/51_table_column_metadata.t @@ -13,8 +13,6 @@ use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::NoWarnings; -plan tests => 16 * @CALL_FUNCS + 1; - for my $call_func (@CALL_FUNCS) { my $dbh = connect_ok(RaiseError => 1); $dbh->do('create table foo (id integer primary key autoincrement, "name space", unique_col integer unique)'); @@ -58,3 +56,5 @@ for my $call_func (@CALL_FUNCS) { ok $@, "successfully died when dbh is inactive"; } } + +done_testing; diff --git a/t/52_db_filename.t b/t/52_db_filename.t index 32acc10..1fe7523 100644 --- a/t/52_db_filename.t +++ b/t/52_db_filename.t @@ -8,8 +8,6 @@ BEGIN { requires_sqlite('3.7.10') } use Test::NoWarnings; -plan tests => 6 * @CALL_FUNCS + 1; - for my $func (@CALL_FUNCS) { { my $db = filename($func); @@ -33,3 +31,5 @@ sub filename { my $dbh = connect_ok(@_); $dbh->$func('db_filename'); } + +done_testing; diff --git a/t/53_status.t b/t/53_status.t index a6ab112..5705c1f 100644 --- a/t/53_status.t +++ b/t/53_status.t @@ -5,12 +5,6 @@ use SQLiteTest qw/connect_ok @CALL_FUNCS has_sqlite/; use Test::More; use Test::NoWarnings; -my $tests = 3; -$tests += 2 if has_sqlite('3.6.4'); -$tests += 1 if has_sqlite('3.7.0'); - -plan tests => 4 + $tests * @CALL_FUNCS + 1; - my $dbh = connect_ok(); { $dbh->do('create table foo (id integer primary key, text)'); @@ -52,3 +46,5 @@ for my $func (@CALL_FUNCS) { } } } + +done_testing; diff --git a/t/54_literal_txn.t b/t/54_literal_txn.t index 7c82c2e..2375619 100644 --- a/t/54_literal_txn.t +++ b/t/54_literal_txn.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; -use Test::More tests => 5; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok(); @@ -21,3 +21,5 @@ $dbh->do("\nCOMMIT"); is $dbh->{AutoCommit}, 1, 'AutoCommit=1 after "\nCOMMIT"'; + +done_testing; diff --git a/t/55_statistics_info.t b/t/55_statistics_info.t index ce0fcab..88fec70 100644 --- a/t/55_statistics_info.t +++ b/t/55_statistics_info.t @@ -40,8 +40,6 @@ CREATE TABLE remote.b ( __EOSQL__ -plan tests => @sql_statements + 2 + 46 * 2; - my $dbh = connect_ok( RaiseError => 1, PrintError => 0, AutoCommit => 1 ); my $sth; my $stats_data; @@ -115,4 +113,6 @@ for my $table_name ('a', 'A') { is($_->{TABLE_SCHEM}, "main", "table schema"); } ok(not(exists $stats_data->{a_ln}->{3}), "only two indexes in a_an index"); -} \ No newline at end of file +} + +done_testing; diff --git a/t/56_open_flags.t b/t/56_open_flags.t index 6d46a2e..69144a0 100644 --- a/t/56_open_flags.t +++ b/t/56_open_flags.t @@ -3,11 +3,6 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; - -my $tests = 7; -$tests += 1 if has_sqlite('3.7.7'); -plan tests => $tests; - use DBI; use DBD::SQLite; @@ -105,3 +100,5 @@ if (has_sqlite('3.7.7')) { $dbh->disconnect; unlink $dbfile if -f $dbfile; } + +done_testing; diff --git a/t/57_uri_filename.t b/t/57_uri_filename.t index 90ab4e3..d89a7d2 100644 --- a/t/57_uri_filename.t +++ b/t/57_uri_filename.t @@ -6,7 +6,6 @@ use Test::More; BEGIN { requires_sqlite('3.7.7') } -plan tests => 17; use DBI; use DBD::SQLite; @@ -219,3 +218,5 @@ cleanup(); $dbh->disconnect; cleanup(); } + +done_testing; diff --git a/t/58_see_if_its_a_number_and_explicit_binding.t b/t/58_see_if_its_a_number_and_explicit_binding.t index 949e791..ffa7730 100644 --- a/t/58_see_if_its_a_number_and_explicit_binding.t +++ b/t/58_see_if_its_a_number_and_explicit_binding.t @@ -6,8 +6,6 @@ use Test::More; use Test::NoWarnings; use DBI qw(:sql_types); -plan tests => 9; - # The following is by mje++ # http://pastebin.com/RkUwwVti @@ -66,3 +64,5 @@ $sth->bind_param(1, 1, SQL_INTEGER); $sth->bind_param(2, $test_value, SQL_VARCHAR); $sth->execute; my_is($dbh, "prepared insert with provided bound data and type SQL_VARCHAR see_if_its_a_number=0"); + +done_testing; diff --git a/t/59_extended_result_codes.t b/t/59_extended_result_codes.t index c35bffd..f9fc677 100644 --- a/t/59_extended_result_codes.t +++ b/t/59_extended_result_codes.t @@ -14,8 +14,6 @@ use Test::NoWarnings; use DBD::SQLite::Constants qw/:extended_result_codes :result_codes/; use File::Temp; -plan tests => 18; - my $tmpdir = File::Temp::tempdir(CLEANUP => 1); ok -d $tmpdir; @@ -50,3 +48,5 @@ for my $flag (0, 1) { my $err = DBI->err; is $err => $expected{$flag}; } + +done_testing; diff --git a/t/60_readonly.t b/t/60_readonly.t index 349f05d..6c342cf 100644 --- a/t/60_readonly.t +++ b/t/60_readonly.t @@ -9,8 +9,6 @@ BEGIN { requires_sqlite('3.7.11') } use Test::NoWarnings; -plan tests => 14; - { my $dbh = connect_ok( sqlite_open_flags => SQLITE_OPEN_READONLY, @@ -40,3 +38,5 @@ plan tests => 14; # told so) ok $dbh->do('CREATE TABLE foo (id)'); } + +done_testing; diff --git a/t/61_strlike.t b/t/61_strlike.t index 05522d1..6e0a81e 100644 --- a/t/61_strlike.t +++ b/t/61_strlike.t @@ -9,8 +9,6 @@ BEGIN { requires_sqlite('3.10.0'); } use Test::NoWarnings; -plan tests => 13; - ok !DBD::SQLite::strlike("foo_bar", "FOO1BAR"); ok !DBD::SQLite::strlike("foo_bar", "FOO_BAR"); ok DBD::SQLite::strlike("foo\\_bar", "FOO1BAR", "\\"); @@ -23,3 +21,5 @@ ok DBD::SQLite::strlike("\\%foobar", "1FOOBAR", "\\"); ok !DBD::SQLite::strlike("\\%foobar", "%FOOBAR", "\\"); ok DBD::SQLite::strlike("!%foobar", "1FOOBAR", "!"); ok !DBD::SQLite::strlike("!%foobar", "%FOOBAR", "!"); + +done_testing; diff --git a/t/62_regexp_multibyte_char_class.t b/t/62_regexp_multibyte_char_class.t index b61d8b7..ac5a13e 100644 --- a/t/62_regexp_multibyte_char_class.t +++ b/t/62_regexp_multibyte_char_class.t @@ -16,8 +16,6 @@ my @words = ("\x{e3}\x{83}\x{86}\x{e3}\x{82}\x{b9}\x{e3}\x{83}\x{88}", "\x{e3}\x my $regex = "\x{e3}\x{83}\x{86}[\x{e3}\x{82}\x{b9}\x{e3}\x{83}\x{b3}]\x{e3}\x{83}\x{88}"; # テ[スン]ト -plan tests => 2 * 2 * @CALL_FUNCS; - foreach my $call_func (@CALL_FUNCS) { for my $use_unicode (0, 1) { @@ -45,3 +43,5 @@ foreach my $call_func (@CALL_FUNCS) { note explain $db_match; } } + +done_testing; diff --git a/t/63_param_values.t b/t/63_param_values.t index b74e9fb..fcf499e 100644 --- a/t/63_param_values.t +++ b/t/63_param_values.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok/; use Test::More; use Test::NoWarnings; -plan tests => 7; - my $dbh = connect_ok( RaiseError => 1 ); ok $dbh->do('create table foo (id integer, value integer)'); { @@ -28,3 +26,5 @@ ok $dbh->do('create table foo (id integer, value integer)'); my $sth = $dbh->prepare('select * from foo where id = ?'); is_deeply $sth->{ParamValues} => {1 => undef}, "ParamValues without binding"; } + +done_testing; diff --git a/t/64_limit.t b/t/64_limit.t index a9473ba..ccfd13c 100644 --- a/t/64_limit.t +++ b/t/64_limit.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; use DBD::SQLite::Constants qw/SQLITE_LIMIT_VARIABLE_NUMBER/; -plan tests => 7 * @CALL_FUNCS; - for my $func (@CALL_FUNCS) { my $dbh = connect_ok(PrintError => 0, RaiseError => 1); my $current_limit = $dbh->$func(SQLITE_LIMIT_VARIABLE_NUMBER, 'limit'); @@ -22,3 +20,5 @@ for my $func (@CALL_FUNCS) { eval { $dbh->do('insert into foo values(?, ?)', undef, 2, 'NOT OK') }; like $@ => qr/too many SQL variables/, "should raise error because of the variable limit"; } + +done_testing; diff --git a/t/65_db_config.t b/t/65_db_config.t index f25b2e3..bafb28c 100644 --- a/t/65_db_config.t +++ b/t/65_db_config.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; use DBD::SQLite::Constants qw/:database_connection_configuration_options/; -plan tests => 38 * @CALL_FUNCS + 3; - # LOOKASIDE for my $func (@CALL_FUNCS) { SKIP: { @@ -215,3 +213,5 @@ SKIP: { ok $@, "updating sqlite_master is prohibited"; like $@ => qr/table sqlite_master may not be modified/; } + +done_testing; diff --git a/t/cookbook_variance.t b/t/cookbook_variance.t index 21ad5ac..0917f47 100644 --- a/t/cookbook_variance.t +++ b/t/cookbook_variance.t @@ -5,8 +5,6 @@ use SQLiteTest; use Test::More; use Test::NoWarnings; -plan tests => 3 * @CALL_FUNCS * 3 + 1; - # The following snippets are copied from Cookbook.pod by hand. # Don't forget to update here when the pod is updated. # Or, use/coin something like Test::Snippets for better synching. @@ -126,3 +124,5 @@ END_SQL is $result->[1] => 1250; } } + +done_testing; diff --git a/t/rt_106151_outermost_savepoint.t b/t/rt_106151_outermost_savepoint.t index 335b18c..b7734e2 100644 --- a/t/rt_106151_outermost_savepoint.t +++ b/t/rt_106151_outermost_savepoint.t @@ -6,7 +6,6 @@ use Test::More; BEGIN { requires_sqlite('3.6.8') } -plan tests => 13; use Test::NoWarnings; { # simple case @@ -154,3 +153,5 @@ use Test::NoWarnings; $dbh->{AutoCommit} = 1; # should not spit the "Issuing rollback()" warning } + +done_testing; diff --git a/t/rt_106950_extra_warnings_with_savepoints.t b/t/rt_106950_extra_warnings_with_savepoints.t index 454503c..e433f5c 100644 --- a/t/rt_106950_extra_warnings_with_savepoints.t +++ b/t/rt_106950_extra_warnings_with_savepoints.t @@ -6,7 +6,6 @@ use Test::More; BEGIN { requires_sqlite('3.6.8') } -plan tests => 2; use Test::NoWarnings; { # simple case @@ -20,3 +19,5 @@ use Test::NoWarnings; $dbh->commit; # should not spit the "Issuing rollback()" warning } + +done_testing; diff --git a/t/rt_115465_column_info_with_spaces.t b/t/rt_115465_column_info_with_spaces.t index 5f23d57..b096574 100644 --- a/t/rt_115465_column_info_with_spaces.t +++ b/t/rt_115465_column_info_with_spaces.t @@ -3,8 +3,6 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; - -plan tests => 14; use Test::NoWarnings; { @@ -30,3 +28,5 @@ use Test::NoWarnings; is $info{bat}[1] => 4; is $info{bat}[2] => 4; } + +done_testing; diff --git a/t/rt_124227_index_regression.t b/t/rt_124227_index_regression.t index ee57ff2..4816a4f 100644 --- a/t/rt_124227_index_regression.t +++ b/t/rt_124227_index_regression.t @@ -5,8 +5,6 @@ use SQLiteTest; use Test::More; use Test::NoWarnings; -plan tests => 5; - my $sql_in_question = <<'EOS'; SELECT cdid FROM cd me @@ -73,3 +71,5 @@ EOS is_deeply $res => [[4], [5]], "got the expected result without the index" or note explain $res; } + +done_testing; diff --git a/t/rt_15186_prepcached.t b/t/rt_15186_prepcached.t index 9a422c8..0cc2031 100644 --- a/t/rt_15186_prepcached.t +++ b/t/rt_15186_prepcached.t @@ -6,7 +6,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 13; +use Test::More; use Test::NoWarnings; # Create a database @@ -68,3 +68,5 @@ SCOPE: { 'Query 2 Row 2', ); } + +done_testing; diff --git a/t/rt_21406_auto_finish.t b/t/rt_21406_auto_finish.t index 22f12ec..9626dc0 100644 --- a/t/rt_21406_auto_finish.t +++ b/t/rt_21406_auto_finish.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 11; +use Test::More; use Test::NoWarnings; SCOPE: { @@ -27,3 +27,5 @@ SCOPE: { is_deeply( $sth2->fetchrow_arrayref, [ 'foo', 'bar', 2 ], 'Row 2 ok' ); ok( $sth2->finish, '->finish ok' ); } + +done_testing; diff --git a/t/rt_25371_asymmetric_unicode.t b/t/rt_25371_asymmetric_unicode.t index 680dd8d..4b79201 100644 --- a/t/rt_25371_asymmetric_unicode.t +++ b/t/rt_25371_asymmetric_unicode.t @@ -4,9 +4,7 @@ use lib "t/lib"; use SQLiteTest; use Test::More; BEGIN { - if ( $] >= 5.008005 ) { - plan( tests => 23 ); - } else { + unless ( $] >= 5.008005 ) { plan( skip_all => 'Unicode is not supported before 5.8.5' ); } } @@ -31,3 +29,5 @@ foreach ( "\0", "A", "\xe9", "\x{20ac}" ) { is $match->[0][0], $_; ok( $dbh->do("DELETE FROM foo"), 'DELETE ok' ); } + +done_testing; diff --git a/t/rt_25460_numeric_aggregate.t b/t/rt_25460_numeric_aggregate.t index 95c073f..2f3408d 100644 --- a/t/rt_25460_numeric_aggregate.t +++ b/t/rt_25460_numeric_aggregate.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 14; +use Test::More; use Test::NoWarnings; # Create the table @@ -55,3 +55,5 @@ is_deeply( ], 'group/sum/sort/limit query ok' ); + +done_testing; diff --git a/t/rt_25924_user_defined_func_unicode.t b/t/rt_25924_user_defined_func_unicode.t index 6e01d74..0f8850c 100644 --- a/t/rt_25924_user_defined_func_unicode.t +++ b/t/rt_25924_user_defined_func_unicode.t @@ -4,9 +4,7 @@ use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; BEGIN { - if ( $] >= 5.008005 ) { - plan( tests => 15 * @CALL_FUNCS + 1); - } else { + unless ( $] >= 5.008005 ) { plan( skip_all => 'Unicode is not supported before 5.8.5' ); } } @@ -38,3 +36,5 @@ sub perl_uc { my $string = shift; return uc($string); } + +done_testing; diff --git a/t/rt_26775_distinct.t b/t/rt_26775_distinct.t index 950ef90..2b26441 100644 --- a/t/rt_26775_distinct.t +++ b/t/rt_26775_distinct.t @@ -7,8 +7,6 @@ use SQLiteTest; BEGIN { requires_sqlite('3.6.3') } -plan tests => 22; - use_ok('DBD::SQLite'); my $noprintquerymsg = '(Set ENV{PRINT_QUERY} to true value to see query)'; @@ -95,6 +93,8 @@ foreach my $query (($query_with_parens, $query_without_parens)) { $dbh->disconnect; +done_testing; + sub trim { my ($string) = @_; $string =~ s/^ \s+ //xms; diff --git a/t/rt_27553_prepared_cache_and_analyze.t b/t/rt_27553_prepared_cache_and_analyze.t index f77202a..7428c78 100644 --- a/t/rt_27553_prepared_cache_and_analyze.t +++ b/t/rt_27553_prepared_cache_and_analyze.t @@ -3,7 +3,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 6; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok( RaiseError => 1, AutoCommit => 1 ); @@ -21,3 +21,5 @@ ok($sth2); my $ret = eval { $sth2->execute(); "ok" }; ok !$@; is($ret, 'ok'); + +done_testing; diff --git a/t/rt_29058_group_by.t b/t/rt_29058_group_by.t index d41a394..992be41 100644 --- a/t/rt_29058_group_by.t +++ b/t/rt_29058_group_by.t @@ -3,7 +3,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 9; +use Test::More; use Test::NoWarnings; use DBI qw(:sql_types); @@ -74,3 +74,5 @@ is( scalar(@$ar), 2, 'Got 2 results' ); # print "4: @$_\n" for @$ar; is( scalar(@$ar), 2, "we got ".(@$ar)." items" ); #} + +done_testing; diff --git a/t/rt_29629_sqlite_where_length.t b/t/rt_29629_sqlite_where_length.t index acba34e..0fce37e 100644 --- a/t/rt_29629_sqlite_where_length.t +++ b/t/rt_29629_sqlite_where_length.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 21; +use Test::More; use Test::NoWarnings; use DBI qw(:sql_types); @@ -88,3 +88,5 @@ is( $sth->fetchrow_arrayref->[0], 1, "result of: $tweaked_statement : [2]" ); $sth = $dbh->prepare($tweaked_statement); ok( $sth->execute(2), "execute: $tweaked_statement : [2]" ); is( $sth->fetchrow_arrayref->[0], 1, "result of: $tweaked_statement : [2]" ); + +done_testing; diff --git a/t/rt_31324_full_names.t b/t/rt_31324_full_names.t index 5ee6bb0..221c86b 100644 --- a/t/rt_31324_full_names.t +++ b/t/rt_31324_full_names.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 8; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok( RaiseError => 1 ); @@ -37,3 +37,5 @@ SCOPE: { 'f.f3' => 1, }, 'Shortname row ok' ); } + +done_testing; diff --git a/t/rt_32889_prepare_cached_reexecute.t b/t/rt_32889_prepare_cached_reexecute.t index 7c64a0f..6839c94 100644 --- a/t/rt_32889_prepare_cached_reexecute.t +++ b/t/rt_32889_prepare_cached_reexecute.t @@ -6,7 +6,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 32; +use Test::More; use Test::NoWarnings; # Create the table @@ -155,3 +155,5 @@ SCOPE: { $dbh->disconnect; is( $c, 1, 'No warnings' ); } + +done_testing; diff --git a/t/rt_36836_duplicate_key.t b/t/rt_36836_duplicate_key.t index 9fb5e21..7dee8a0 100644 --- a/t/rt_36836_duplicate_key.t +++ b/t/rt_36836_duplicate_key.t @@ -4,7 +4,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 5; +use Test::More; use Test::NoWarnings; # Create a database @@ -18,3 +18,5 @@ ok( $dbh->do('INSERT INTO one ( num ) values ( 1 )'), 'insert' ); # Insert a duplicate ok( ! $dbh->do('INSERT INTO one ( num ) values ( 1 )'), 'duplicate' ); + +done_testing; diff --git a/t/rt_36838_unique_and_bus_error.t b/t/rt_36838_unique_and_bus_error.t index 3946981..7174cbb 100644 --- a/t/rt_36838_unique_and_bus_error.t +++ b/t/rt_36838_unique_and_bus_error.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 4; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok( RaiseError => 1, PrintError => 0 ); @@ -13,3 +13,5 @@ ok $dbh->do("INSERT INTO nums (num) VALUES (?)", undef, 1); eval { $dbh->do("INSERT INTO nums (num) VALUES (?)", undef, 1); }; ok $@ =~ /column num is not unique|UNIQUE constraint failed/, $@; # should not be a bus error + +done_testing; diff --git a/t/rt_40594_nullable.t b/t/rt_40594_nullable.t index 1caf580..9f46276 100644 --- a/t/rt_40594_nullable.t +++ b/t/rt_40594_nullable.t @@ -11,8 +11,6 @@ BEGIN { } } -plan tests => 6; - my $dbh = connect_ok(); ok $dbh->do("CREATE TABLE foo (id INTEGER PRIMARY KEY NOT NULL, col1 varchar(2) NOT NULL, col2 varchar(2), col3 char(2) NOT NULL)"); @@ -28,3 +26,5 @@ my $expected = { for my $m (keys %$expected) { is_deeply($sth->{$m}, $expected->{$m}); } + +done_testing; diff --git a/t/rt_48393_debug_panic_with_commit.t b/t/rt_48393_debug_panic_with_commit.t index bb642f5..720565b 100644 --- a/t/rt_48393_debug_panic_with_commit.t +++ b/t/rt_48393_debug_panic_with_commit.t @@ -13,8 +13,6 @@ BEGIN { use Test::NoWarnings; -plan tests => 2; - my $file = 't/panic.pl'; open my $fh, '>', $file; print $fh ; @@ -32,6 +30,8 @@ END { unlink 'test.db' if -f 'test.db'; } +done_testing; + __DATA__ use strict; use warnings; diff --git a/t/rt_50503_fts3.t b/t/rt_50503_fts3.t index 437ac72..b352852 100644 --- a/t/rt_50503_fts3.t +++ b/t/rt_50503_fts3.t @@ -17,8 +17,6 @@ BEGIN { use Test::NoWarnings; -plan tests => 6; - my $dbh = connect_ok( RaiseError => 1, AutoCommit => 0 ); $dbh->do(<execute($inc_num, $text) || die "execute failed\n"; $dbh->commit; } + +done_testing; diff --git a/t/rt_52573_manual_exclusive_lock.t b/t/rt_52573_manual_exclusive_lock.t index c88e90a..c298ccd 100644 --- a/t/rt_52573_manual_exclusive_lock.t +++ b/t/rt_52573_manual_exclusive_lock.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 92 * 4 + 2; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok( @@ -207,3 +207,5 @@ foreach my $func (@funcs) { } eval { $dbh->{AutoCommit} = 1 }; # to end transaction $dbh->disconnect; + +done_testing; diff --git a/t/rt_53235_icu_compatibility.t b/t/rt_53235_icu_compatibility.t index 05200bd..54f5c8f 100644 --- a/t/rt_53235_icu_compatibility.t +++ b/t/rt_53235_icu_compatibility.t @@ -5,10 +5,8 @@ use SQLiteTest; use Test::More; BEGIN { require DBD::SQLite; - if (DBD::SQLite->can('compile_options') + unless (DBD::SQLite->can('compile_options') && grep /ENABLE_ICU/, DBD::SQLite::compile_options()) { - plan( tests => 16 ); - } else { plan( skip_all => 'requires SQLite ICU plugin to be enabled' ); } } @@ -89,3 +87,5 @@ utf8::encode($koenig); is $got[$i] => $expected[$i], "got: $got[$i]"; } } + +done_testing; diff --git a/t/rt_62370_diconnected_handles_operation.t b/t/rt_62370_diconnected_handles_operation.t index b6e506a..fb4d23b 100644 --- a/t/rt_62370_diconnected_handles_operation.t +++ b/t/rt_62370_diconnected_handles_operation.t @@ -10,8 +10,6 @@ my @methods = qw( commit rollback ); -plan tests => 2 * (6 + @methods) + 2 * @CALL_FUNCS * (14 + ($DBD::SQLite::sqlite_version_number >= 3006011) * 2); - local $SIG{__WARN__} = sub {}; # to hide warnings/error messages # DBI methods @@ -175,3 +173,5 @@ for my $call_func (@CALL_FUNCS) { } } } + +done_testing; diff --git a/t/rt_64177_ping_wipes_out_the_errstr.t b/t/rt_64177_ping_wipes_out_the_errstr.t index 51f4cef..613fa7a 100644 --- a/t/rt_64177_ping_wipes_out_the_errstr.t +++ b/t/rt_64177_ping_wipes_out_the_errstr.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 8; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok(RaiseError => 1, PrintError => 0); @@ -13,3 +13,5 @@ ok $dbh->errstr, "has errstr"; ok $dbh->ping, "ping succeeded"; ok $dbh->err, "err is not wiped out"; ok $dbh->errstr, "errstr is not wiped out"; + +done_testing; diff --git a/t/rt_67581_bind_params_mismatch.t b/t/rt_67581_bind_params_mismatch.t index 4a57e40..21aaca9 100644 --- a/t/rt_67581_bind_params_mismatch.t +++ b/t/rt_67581_bind_params_mismatch.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; -use Test::More tests => 34; +use Test::More; use DBI qw/:sql_types/; my $id = 0; @@ -139,3 +139,5 @@ for my $has_pk (0..1) { $dbh->disconnect; } + +done_testing; diff --git a/t/rt_71311_bind_col_and_unicode.t b/t/rt_71311_bind_col_and_unicode.t index 36ea300..ebc8a7d 100644 --- a/t/rt_71311_bind_col_and_unicode.t +++ b/t/rt_71311_bind_col_and_unicode.t @@ -4,9 +4,7 @@ use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; BEGIN { - if ( $] >= 5.008005 ) { - plan( tests => 50 ); - } else { + unless ( $] >= 5.008005 ) { plan( skip_all => 'Unicode is not supported before 5.8.5' ); } } @@ -112,3 +110,5 @@ my $str = "\x{20ac}"; } $sth->finish; } + +done_testing; diff --git a/t/rt_73159_fts_tokenizer_segfault.t b/t/rt_73159_fts_tokenizer_segfault.t index 7d9f74e..8de41fc 100644 --- a/t/rt_73159_fts_tokenizer_segfault.t +++ b/t/rt_73159_fts_tokenizer_segfault.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 2; +use Test::More; use DBI; my $dbh = connect_ok(RaiseError => 1, PrintError => 0); @@ -31,3 +31,5 @@ eval { $dbh->do('CREATE VIRTUAL TABLE FIXMESSAGE USING FTS3(MESSAGE, tokenize=perl, "main::locale_tokenizer");'); }; ok $@, "cause an error but not segfault"; + +done_testing; diff --git a/t/rt_73787_exponential_buffer_overflow.t b/t/rt_73787_exponential_buffer_overflow.t index e006e9a..5fcbf63 100644 --- a/t/rt_73787_exponential_buffer_overflow.t +++ b/t/rt_73787_exponential_buffer_overflow.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; -use Test::More tests => 6; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok(sqlite_see_if_its_a_number => 1); @@ -16,3 +16,5 @@ for my $value (qw/2e100 10.04e100/) { }; ok !$@, "and without errors"; } + +done_testing; diff --git a/t/rt_76395_int_overflow.t b/t/rt_76395_int_overflow.t index a9278cf..a5a4218 100644 --- a/t/rt_76395_int_overflow.t +++ b/t/rt_76395_int_overflow.t @@ -43,8 +43,6 @@ my @tests = qw( 2147483649 ); -plan tests => 1 + @tests * 6 * 6; - my $dbh = connect_ok(); $dbh->do(' CREATE TABLE t ( @@ -108,3 +106,5 @@ for my $val (@tests) { } } } + +done_testing; diff --git a/t/rt_77724_primary_key_with_a_whitespace.t b/t/rt_77724_primary_key_with_a_whitespace.t index 8e6138a..bf4cf25 100644 --- a/t/rt_77724_primary_key_with_a_whitespace.t +++ b/t/rt_77724_primary_key_with_a_whitespace.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 4; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok(RaiseError => 1, PrintError => 0); @@ -19,3 +19,5 @@ ok $row, 'Found the primary key column.'; is $row->{COLUMN_NAME} => "Country Code", 'Key column name reported correctly.' or note explain $row; + +done_testing; diff --git a/t/rt_78833_utf8_flag_for_column_names.t b/t/rt_78833_utf8_flag_for_column_names.t index caf3940..f9b455b 100644 --- a/t/rt_78833_utf8_flag_for_column_names.t +++ b/t/rt_78833_utf8_flag_for_column_names.t @@ -5,11 +5,7 @@ use SQLiteTest; use Test::More; BEGIN { - if ( $] >= 5.008005 ) { - my $tests = 27; - $tests += 2 if has_sqlite('3.6.14'); - plan( tests => $tests * 2 + 1 ); - } else { + unless ( $] >= 5.008005 ) { plan( skip_all => 'Unicode is not supported before 5.8.5' ); } } @@ -161,3 +157,5 @@ sub unicode_test { } } } + +done_testing; diff --git a/t/rt_81536_multi_column_primary_key_info.t b/t/rt_81536_multi_column_primary_key_info.t index 87b9be1..ce3a922 100644 --- a/t/rt_81536_multi_column_primary_key_info.t +++ b/t/rt_81536_multi_column_primary_key_info.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok/; use Test::More; use Test::NoWarnings; -plan tests => 15 + 1; - # single column integer primary key { my $dbh = connect_ok(); @@ -59,3 +57,5 @@ plan tests => 15 + 1; @pk = map $_->{COLUMN_NAME}, sort {$a->{KEY_SEQ} <=> $b->{KEY_SEQ}} @pk_info; is join(' ', @pk) => 'c"d b a', 'pk KEY_SEQ is correct'; } + +done_testing; diff --git a/t/rt_88228_sqlite_3_8_0_crash.t b/t/rt_88228_sqlite_3_8_0_crash.t index af8c871..0d240b8 100644 --- a/t/rt_88228_sqlite_3_8_0_crash.t +++ b/t/rt_88228_sqlite_3_8_0_crash.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest; -use Test::More tests => 3; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok(); @@ -44,3 +44,5 @@ $dbh->do($_) for ( ); pass "all done without segfault"; + +done_testing; diff --git a/t/rt_96050_db_filename_for_a_closed_database.t b/t/rt_96050_db_filename_for_a_closed_database.t index 928ad96..b0b8628 100644 --- a/t/rt_96050_db_filename_for_a_closed_database.t +++ b/t/rt_96050_db_filename_for_a_closed_database.t @@ -7,9 +7,6 @@ use SQLiteTest; use Test::More; use Test::NoWarnings; -my $tests = 2; -plan tests => 1 + $tests * @CALL_FUNCS + 1; - my $dbh = connect_ok( RaiseError => 1, PrintError => 0 ); for my $func (@CALL_FUNCS) { my $filename = eval { $dbh->$func('db_filename') }; @@ -22,3 +19,5 @@ for my $func (@CALL_FUNCS) { my $filename = eval { $dbh->$func('db_filename') }; ok !$@ && !$filename, "got no error; no filename; and no segfault"; } + +done_testing; diff --git a/t/rt_96877_unicode_statements.t b/t/rt_96877_unicode_statements.t index c43b0a1..41263e6 100644 --- a/t/rt_96877_unicode_statements.t +++ b/t/rt_96877_unicode_statements.t @@ -8,9 +8,7 @@ use lib "t/lib"; use SQLiteTest; use Test::More; BEGIN { - if ( $] >= 5.008005 ) { - plan( tests => 16 ); - } else { + unless ( $] >= 5.008005 ) { plan( skip_all => 'Unicode is not supported before 5.8.5' ); } } @@ -34,3 +32,5 @@ foreach ( "A", "\xe9", "\x{20ac}" ) { ok( $dbh->do("DELETE FROM foo"), 'DELETE ok' ); } + +done_testing; diff --git a/t/rt_96878_fts_contentless_table.t b/t/rt_96878_fts_contentless_table.t index f2f9e3e..3d453be 100644 --- a/t/rt_96878_fts_contentless_table.t +++ b/t/rt_96878_fts_contentless_table.t @@ -14,7 +14,6 @@ BEGIN { requires_sqlite('3.7.9') } BEGIN { plan skip_all => 'FTS3 is disabled for this DBD::SQLite' if !grep /ENABLE_FTS3/, DBD::SQLite::compile_options() } use DBI qw/SQL_INTEGER/; -plan tests => 8; use Test::NoWarnings; my $dbh = connect_ok(RaiseError => 1, AutoCommit => 1); @@ -47,3 +46,5 @@ ok($sth->execute(), ok( $dbh->do("CREATE VIRTUAL TABLE foo_aux USING fts4aux(foo)"), 'FTS4AUX'); my $data = $dbh->selectcol_arrayref("select term from foo_aux where col='*'"); is_deeply ([sort @$data], [qw/a aa aaa b bb bbb/], "terms properly indexed"); + +done_testing; diff --git a/t/rt_97598_crash_on_disconnect_with_virtual_tables.t b/t/rt_97598_crash_on_disconnect_with_virtual_tables.t index 1ef9369..c8113a1 100644 --- a/t/rt_97598_crash_on_disconnect_with_virtual_tables.t +++ b/t/rt_97598_crash_on_disconnect_with_virtual_tables.t @@ -7,7 +7,6 @@ use Test::More; BEGIN { requires_sqlite('3.7.7') } BEGIN { plan skip_all => 'FTS3 is disabled for this DBD::SQLite' if !grep /ENABLE_FTS3/, DBD::SQLite::compile_options() } -plan tests => 3; use Test::NoWarnings; my $dbh = connect_ok(AutoCommit => 0); @@ -36,3 +35,5 @@ $dbh->commit; $dbh->disconnect; pass "all done without segfault"; + +done_testing; diff --git a/t/virtual_table/00_base.t b/t/virtual_table/00_base.t index 2b79c21..23991f3 100644 --- a/t/virtual_table/00_base.t +++ b/t/virtual_table/00_base.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok $sqlite_call/; use Test::More; use Test::NoWarnings; -plan tests => 1 + 9; - my $dbh = connect_ok( RaiseError => 1, PrintError => 0, AutoCommit => 1 ); $dbh->$sqlite_call(create_module => vtab => "DBD::SQLite::VirtualTable::T"); @@ -30,6 +28,8 @@ $sql = "SELECT * FROM foobar WHERE foo > -1 and bar < 33"; $rows = $dbh->selectall_arrayref($sql, {Slice => {}}); is scalar(@$rows), 5, "got 5 rows (because of omitted constraints)"; +done_testing; + package DBD::SQLite::VirtualTable::T; use strict; use warnings; diff --git a/t/virtual_table/01_destroy.t b/t/virtual_table/01_destroy.t index 6412d68..8065bca 100644 --- a/t/virtual_table/01_destroy.t +++ b/t/virtual_table/01_destroy.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok $sqlite_call/; use Test::More; use Test::NoWarnings; -plan tests => 1 + 19; - my $dbfile = "tmp.sqlite"; my $dbh = connect_ok( dbfile => $dbfile, RaiseError => 1, AutoCommit => 1 ); @@ -52,6 +50,8 @@ my $sth = $dbh->prepare("SELECT * FROM barfoo"); ok !$DBD::SQLite::VirtualTable::T::CREATE_COUNT, "no vtab created"; is $DBD::SQLite::VirtualTable::T::CONNECT_COUNT, 1, "1 vtab connected"; +done_testing; + package DBD::SQLite::VirtualTable::T; use base 'DBD::SQLite::VirtualTable'; diff --git a/t/virtual_table/02_find_function.t b/t/virtual_table/02_find_function.t index c2202d0..11815a4 100644 --- a/t/virtual_table/02_find_function.t +++ b/t/virtual_table/02_find_function.t @@ -5,8 +5,6 @@ use SQLiteTest qw/connect_ok $sqlite_call/; use Test::More; use Test::NoWarnings; -plan tests => 15; - my $dbh = connect_ok( RaiseError => 1, PrintError => 0, AutoCommit => 1 ); $dbh->$sqlite_call(create_module => vtab => "DBD::SQLite::VirtualTable::T"); @@ -72,6 +70,8 @@ undef $dbh; note "done"; +done_testing; + package DBD::SQLite::VirtualTable::T; use strict; use warnings; diff --git a/t/virtual_table/10_filecontent.t b/t/virtual_table/10_filecontent.t index 3684384..e9a07eb 100644 --- a/t/virtual_table/10_filecontent.t +++ b/t/virtual_table/10_filecontent.t @@ -8,8 +8,6 @@ use FindBin; plan skip_all => "\$FindBin::Bin points to a nonexistent path for some reason: $FindBin::Bin" if !-d $FindBin::Bin; -plan tests => 13; - my $dbh = connect_ok( RaiseError => 1, PrintError => 0, AutoCommit => 1 ); # create index table @@ -53,3 +51,5 @@ is $rows->[1]{bar}, 'bar2', 'got bar2'; $sql = "SELECT * FROM vfs WHERE content LIKE '%filesys%'"; $rows = $dbh->selectall_arrayref($sql, {Slice => {}}); is scalar(@$rows), 1, "got 1 row"; + +done_testing; diff --git a/t/virtual_table/11_filecontent_fulltext.t b/t/virtual_table/11_filecontent_fulltext.t index 6846cd7..9c70c01 100644 --- a/t/virtual_table/11_filecontent_fulltext.t +++ b/t/virtual_table/11_filecontent_fulltext.t @@ -48,8 +48,6 @@ if (grep /ENABLE_FTS3_PARENTHESIS/, DBD::SQLite::compile_options()) { ); } -plan tests => 3 + 3 * @tests; - # find out perl files in this distrib my $distrib_dir = "$FindBin::Bin/../.."; open my $fh, "<", "$distrib_dir/MANIFEST" or die "open $distrib_dir/MANIFEST: $!"; @@ -111,3 +109,5 @@ foreach my $test (@tests) { my $paths = $dbh->selectcol_arrayref($sql, {}, $pattern); is_deeply([sort @$paths], \@expected, "search '$pattern' -- after reconnect"); } + +done_testing; diff --git a/t/virtual_table/20_perldata.t b/t/virtual_table/20_perldata.t index b6817b1..958a5d2 100644 --- a/t/virtual_table/20_perldata.t +++ b/t/virtual_table/20_perldata.t @@ -15,10 +15,6 @@ our $perl_rows = [ [7, 8, 'nine' ], ]; -my $tests = 25; -$tests += 2 * 2 if has_sqlite('3.7.11'); -plan tests => $tests; - my $dbh = connect_ok( RaiseError => 1, AutoCommit => 1 ); ok $dbh->$sqlite_call(create_module => @@ -117,3 +113,5 @@ is_deeply $res, [ 1 ], "IN strarray"; $sql = "SELECT a FROM vtb WHERE c IN (SELECT str FROM strarray WHERE str > 'a')"; $res = $dbh->selectcol_arrayref($sql); is_deeply $res, [ 1 ], "IN SELECT FROM strarray"; + +done_testing; diff --git a/t/virtual_table/21_perldata_charinfo.t b/t/virtual_table/21_perldata_charinfo.t index 71381ca..3c6f02d 100644 --- a/t/virtual_table/21_perldata_charinfo.t +++ b/t/virtual_table/21_perldata_charinfo.t @@ -9,10 +9,7 @@ use Test::More; BEGIN { # check for old Perls which did not have Unicode::UCD in core - if (eval "use Unicode::UCD 'charinfo'; 1") { - plan tests => 10; - } - else { + unless (eval "use Unicode::UCD 'charinfo'; 1") { plan skip_all => "Unicode::UCD does not seem to be installed"; } } @@ -55,3 +52,5 @@ $sql = "SELECT * FROM charinfo WHERE script='Greek' AND name REGEXP '\\bSIGMA\\b $res = $dbh->selectall_arrayref($sql, {Slice => {}}); ok scalar(@$res), "found sigma letters"; is $res->[0]{block}, $sigma_block, "letter in proper block"; + +done_testing; diff --git a/t/virtual_table/rt_124941.t b/t/virtual_table/rt_124941.t index 189d4cb..ee7957a 100644 --- a/t/virtual_table/rt_124941.t +++ b/t/virtual_table/rt_124941.t @@ -2,7 +2,7 @@ use strict; use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok $sqlite_call has_sqlite/; -use Test::More tests => 6; +use Test::More; use Test::NoWarnings; my $dbh = connect_ok(sqlite_trace => 2); @@ -88,3 +88,5 @@ EOT is_deeply($got_aref, $expected_aref, $test_desc); } + +done_testing; diff --git a/t/virtual_table/rt_99748.t b/t/virtual_table/rt_99748.t index d78ccd6..413980c 100644 --- a/t/virtual_table/rt_99748.t +++ b/t/virtual_table/rt_99748.t @@ -28,10 +28,6 @@ our $perl_rows = [ [12, undef, "data\nhas\tspaces"], ]; -my $tests = 14; -$tests += 2 if has_sqlite('3.6.19'); -plan tests => 4 + 2 * $tests + @interpolation_attempts + 9; - my $dbh = connect_ok( RaiseError => 1, AutoCommit => 1 ); # create a regular table so that we can compare results with the virtual table @@ -151,3 +147,5 @@ sub test_match_operator { is_deeply $res, [], $sql; } + +done_testing;