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

DBD-SQLite: skip_all should be in a BEGIN block and be placed before use Test::NoWarnings

This commit is contained in:
Kenichi Ishigaki 2009-07-21 14:05:06 +00:00
parent 9b62d7a2aa
commit cb8a0ec896
2 changed files with 10 additions and 6 deletions

View file

@ -8,7 +8,6 @@ BEGIN {
use t::lib::Test qw/connect_ok @CALL_FUNCS/; use t::lib::Test qw/connect_ok @CALL_FUNCS/;
use Test::More; use Test::More;
use Test::NoWarnings;
BEGIN { BEGIN {
if ( $] >= 5.008005 ) { if ( $] >= 5.008005 ) {
plan( tests => 10 * @CALL_FUNCS + 1 ); plan( tests => 10 * @CALL_FUNCS + 1 );
@ -16,6 +15,7 @@ BEGIN {
plan( skip_all => 'Unicode is not supported before 5.8.5' ); plan( skip_all => 'Unicode is not supported before 5.8.5' );
} }
} }
use Test::NoWarnings;
use Encode qw/decode/; use Encode qw/decode/;
use DBD::SQLite; use DBD::SQLite;

View file

@ -8,7 +8,6 @@ BEGIN {
use t::lib::Test qw/connect_ok @CALL_FUNCS/; use t::lib::Test qw/connect_ok @CALL_FUNCS/;
use Test::More; use Test::More;
use Test::NoWarnings;
my @words = qw{ my @words = qw{
berger Bergère bergère Bergere berger Bergère bergère Bergere
@ -19,10 +18,15 @@ my @words = qw{
}; };
my @regexes = qw( ^b\\w+ (?i:^b\\w+) ); my @regexes = qw( ^b\\w+ (?i:^b\\w+) );
plan skip_all => 'Unicode is not supported before 5.8.5' BEGIN {
if $] < 5.008005; if ($] < 5.008005) {
plan tests => 2 * (1 + 2 * @regexes) * @CALL_FUNCS + 1 ; plan skip_all => 'Unicode is not supported before 5.8.5'
}
else {
plan tests => 2 * (1 + 2 * @regexes) * @CALL_FUNCS + 1 ;
}
}
use Test::NoWarnings;
BEGIN { BEGIN {
# Sadly perl for windows (and probably sqlite, too) may hang # Sadly perl for windows (and probably sqlite, too) may hang