diff --git a/t/02_logon.t b/t/02_logon.t index 3502753..ef73c28 100644 --- a/t/02_logon.t +++ b/t/02_logon.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $show_diag = 0; foreach my $call_func (@CALL_FUNCS) { diff --git a/t/03_create_table.t b/t/03_create_table.t index 4a55aba..bd9b3ab 100644 --- a/t/03_create_table.t +++ b/t/03_create_table.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(); $dbh->do(<<'END_SQL'); diff --git a/t/04_insert.t b/t/04_insert.t index 0562e7c..18c5c9b 100644 --- a/t/04_insert.t +++ b/t/04_insert.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(); diff --git a/t/05_select.t b/t/05_select.t index da669fe..73b29d9 100644 --- a/t/05_select.t +++ b/t/05_select.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1 ); $dbh->do("CREATE TABLE f (f1, f2, f3)"); diff --git a/t/06_tran.t b/t/06_tran.t index d51419c..5940da5 100644 --- a/t/06_tran.t +++ b/t/06_tran.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( AutoCommit => 0, diff --git a/t/07_error.t b/t/07_error.t index 11af543..c2b1620 100644 --- a/t/07_error.t +++ b/t/07_error.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, PrintError => 0 ); eval { diff --git a/t/08_busy.t b/t/08_busy.t index 4446873..7e1ac22 100644 --- a/t/08_busy.t +++ b/t/08_busy.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok dbfile @CALL_FUNCS/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; foreach my $call_func (@CALL_FUNCS) { diff --git a/t/09_create_function.t b/t/09_create_function.t index edb7483..5cfdaaa 100644 --- a/t/09_create_function.t +++ b/t/09_create_function.t @@ -4,7 +4,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBD::SQLite; use DBD::SQLite::Constants; diff --git a/t/10_create_aggregate.t b/t/10_create_aggregate.t index 92f9b99..29ffbde 100644 --- a/t/10_create_aggregate.t +++ b/t/10_create_aggregate.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBD::SQLite; use DBD::SQLite::Constants; diff --git a/t/11_get_info.t b/t/11_get_info.t index 6295568..0961808 100644 --- a/t/11_get_info.t +++ b/t/11_get_info.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI::Const::GetInfoType; diff --git a/t/12_unicode.t b/t/12_unicode.t index a1f616f..1776d53 100644 --- a/t/12_unicode.t +++ b/t/12_unicode.t @@ -6,7 +6,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_unicode_support() } diff --git a/t/13_create_collation.t b/t/13_create_collation.t index c5fd9b7..28f25fd 100644 --- a/t/13_create_collation.t +++ b/t/13_create_collation.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use Encode qw/decode/; use DBD::SQLite; diff --git a/t/14_progress_handler.t b/t/14_progress_handler.t index 8095c4a..e6e7061 100644 --- a/t/14_progress_handler.t +++ b/t/14_progress_handler.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $N_OPCODES = 50; # how many opcodes before calling the progress handler diff --git a/t/15_ak_dbd.t b/t/15_ak_dbd.t index cb12cca..b752a88 100644 --- a/t/15_ak_dbd.t +++ b/t/15_ak_dbd.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create a database my $dbh = connect_ok( dbfile => 'foo', RaiseError => 1, PrintError => 1, PrintWarn => 1 ); diff --git a/t/16_column_info.t b/t/16_column_info.t index 3bedae2..88ff898 100644 --- a/t/16_column_info.t +++ b/t/16_column_info.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = DBI->connect('dbi:SQLite:dbname=:memory:',undef,undef,{RaiseError => 1}); diff --git a/t/17_createdrop.t b/t/17_createdrop.t index f126ac1..5ac62cc 100644 --- a/t/17_createdrop.t +++ b/t/17_createdrop.t @@ -6,7 +6,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create a database my $dbh = connect_ok(); diff --git a/t/18_insertfetch.t b/t/18_insertfetch.t index ca18158..aadd62b 100644 --- a/t/18_insertfetch.t +++ b/t/18_insertfetch.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create a database my $dbh = connect_ok( RaiseError => 1 ); diff --git a/t/19_bindparam.t b/t/19_bindparam.t index f4e294b..6a4df2b 100644 --- a/t/19_bindparam.t +++ b/t/19_bindparam.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI ':sql_types'; # Create a database diff --git a/t/20_blobs.t b/t/20_blobs.t index a139340..4e29017 100644 --- a/t/20_blobs.t +++ b/t/20_blobs.t @@ -6,7 +6,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI ':sql_types'; sub ShowBlob($) { diff --git a/t/21_blobtext.t b/t/21_blobtext.t index 8c7eeb1..9a3d995 100644 --- a/t/21_blobtext.t +++ b/t/21_blobtext.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, diff --git a/t/22_listfields.t b/t/22_listfields.t index 4a97f93..1bf5a8c 100644 --- a/t/22_listfields.t +++ b/t/22_listfields.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create a database my $dbh = connect_ok(); diff --git a/t/23_nulls.t b/t/23_nulls.t index 4f262c1..be4c29d 100644 --- a/t/23_nulls.t +++ b/t/23_nulls.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create a database my $dbh = connect_ok(); diff --git a/t/24_numrows.t b/t/24_numrows.t index ef150aa..e50b62c 100644 --- a/t/24_numrows.t +++ b/t/24_numrows.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; sub rows { my $sth = shift; diff --git a/t/25_chopblanks.t b/t/25_chopblanks.t index bcb5324..e0a5d21 100644 --- a/t/25_chopblanks.t +++ b/t/25_chopblanks.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create a database my $dbh = connect_ok( RaiseError => 1 ); diff --git a/t/26_commit.t b/t/26_commit.t index 5b047ef..90b4910 100644 --- a/t/26_commit.t +++ b/t/26_commit.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -# use Test::FailWarnings; +# use if -d ".git", "Test::FailWarnings"; my $warning_count = 0; diff --git a/t/27_metadata.t b/t/27_metadata.t index c1c01b2..62646c7 100644 --- a/t/27_metadata.t +++ b/t/27_metadata.t @@ -3,7 +3,7 @@ use warnings; use Test::More; use lib "t/lib"; use SQLiteTest; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # 1-4. Connect & create tables my $dbh = connect_ok(dbfile => 'foo'); diff --git a/t/28_schemachange.t b/t/28_schemachange.t index 7130399..0d126a5 100644 --- a/t/28_schemachange.t +++ b/t/28_schemachange.t @@ -6,7 +6,7 @@ use warnings; use Test::More; use lib "t/lib"; use SQLiteTest; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $create1 = 'CREATE TABLE table1 (id INTEGER NOT NULL, name CHAR (64) NOT NULL)'; my $create2 = 'CREATE TABLE table2 (id INTEGER NOT NULL, name CHAR (64) NOT NULL)'; diff --git a/t/30_auto_rollback.t b/t/30_auto_rollback.t index bb5782b..4d51189 100644 --- a/t/30_auto_rollback.t +++ b/t/30_auto_rollback.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; SCOPE: { my $dbh = connect_ok( RaiseError => 1, PrintWarn => 0, Warn => 0 ); diff --git a/t/31_bind_weird_number_param.t b/t/31_bind_weird_number_param.t index f237e10..6785338 100644 --- a/t/31_bind_weird_number_param.t +++ b/t/31_bind_weird_number_param.t @@ -6,7 +6,7 @@ BEGIN { @to_be_tested = (1.23E4); } use Test::More; use lib "t/lib"; use SQLiteTest; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(); diff --git a/t/32_inactive_error.t b/t/32_inactive_error.t index a237f2e..0081348 100644 --- a/t/32_inactive_error.t +++ b/t/32_inactive_error.t @@ -3,7 +3,7 @@ use warnings; use Test::More; use lib "t/lib"; use SQLiteTest; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( PrintError => 0, RaiseError => 0 ); diff --git a/t/33_non_latin_path.t b/t/33_non_latin_path.t index d60b7a1..49deb6c 100644 --- a/t/33_non_latin_path.t +++ b/t/33_non_latin_path.t @@ -6,7 +6,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use File::Temp (); use File::Spec::Functions ':ALL'; diff --git a/t/34_online_backup.t b/t/34_online_backup.t index afc110a..dd6855c 100644 --- a/t/34_online_backup.t +++ b/t/34_online_backup.t @@ -7,7 +7,7 @@ use SQLiteTest qw/connect_ok dbfile @CALL_FUNCS requires_sqlite/; BEGIN { requires_sqlite('3.6.11') } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI; foreach my $call_func (@CALL_FUNCS) { diff --git a/t/35_table_info.t b/t/35_table_info.t index 577456e..fd4efc1 100644 --- a/t/35_table_info.t +++ b/t/35_table_info.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my @catalog_info = ( [undef, undef, undef, undef, undef], diff --git a/t/36_hooks.t b/t/36_hooks.t index e036947..6ebc889 100644 --- a/t/36_hooks.t +++ b/t/36_hooks.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBD::SQLite; diff --git a/t/37_regexp.t b/t/37_regexp.t index d7dc3a1..aa667ed 100644 --- a/t/37_regexp.t +++ b/t/37_regexp.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my @words = qw{ berger Bergère bergère Bergere diff --git a/t/38_empty_statement.t b/t/38_empty_statement.t index 7f7467a..86dd34a 100644 --- a/t/38_empty_statement.t +++ b/t/38_empty_statement.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1 ); diff --git a/t/39_foreign_keys.t b/t/39_foreign_keys.t index 656149d..746d8a1 100644 --- a/t/39_foreign_keys.t +++ b/t/39_foreign_keys.t @@ -6,7 +6,7 @@ use Test::More; BEGIN { requires_sqlite('3.6.19') } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # following tests are from http://www.sqlite.org/foreignkeys.html diff --git a/t/40_multiple_statements.t b/t/40_multiple_statements.t index e890b03..a932f01 100644 --- a/t/40_multiple_statements.t +++ b/t/40_multiple_statements.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; { # DBD::SQLite prepares/does the first statement only; diff --git a/t/41_placeholders.t b/t/41_placeholders.t index 715c7fb..ee1cb84 100644 --- a/t/41_placeholders.t +++ b/t/41_placeholders.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1 ); ok $dbh->do('create table foo (id integer, value integer)'); diff --git a/t/42_primary_key_info.t b/t/42_primary_key_info.t index 1f31995..bad0cd9 100644 --- a/t/42_primary_key_info.t +++ b/t/42_primary_key_info.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; for my $quote ('', qw/' " ` []/) { my ($begin_quote, $end_quote) = (substr($quote, 0, 1), substr($quote, -1, 1)); diff --git a/t/43_fts3.t b/t/43_fts3.t index 098fa65..ccf6ad1 100644 --- a/t/43_fts3.t +++ b/t/43_fts3.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBD::SQLite; my @texts = ("il était une bergère", diff --git a/t/44_rtree.t b/t/44_rtree.t index 9787844..f3069e9 100644 --- a/t/44_rtree.t +++ b/t/44_rtree.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { if (!has_compile_option('ENABLE_RTREE')) { diff --git a/t/45_savepoints.t b/t/45_savepoints.t index d9affea..fe6417d 100644 --- a/t/45_savepoints.t +++ b/t/45_savepoints.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_sqlite('3.6.8') } diff --git a/t/46_mod_perl.t b/t/46_mod_perl.t index eba3362..05c6ea6 100644 --- a/t/46_mod_perl.t +++ b/t/46_mod_perl.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { eval {require APR::Table; 1}; diff --git a/t/47_execute.t b/t/47_execute.t index f63911a..9a6d44c 100644 --- a/t/47_execute.t +++ b/t/47_execute.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok dbfile @CALL_FUNCS/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; foreach my $call_func (@CALL_FUNCS) { diff --git a/t/48_bind_param_is_sticky.t b/t/48_bind_param_is_sticky.t index 071f8b0..c5b3bab 100644 --- a/t/48_bind_param_is_sticky.t +++ b/t/48_bind_param_is_sticky.t @@ -6,7 +6,7 @@ use lib "t/lib"; use SQLiteTest qw/connect_ok/; use DBI qw(:sql_types); use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, diff --git a/t/49_trace_and_profile.t b/t/49_trace_and_profile.t index fd09efd..a4fe17d 100644 --- a/t/49_trace_and_profile.t +++ b/t/49_trace_and_profile.t @@ -6,7 +6,7 @@ use Test::More; BEGIN { requires_sqlite('3.6.21') } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $flag = 0; for my $call_func (@CALL_FUNCS) { diff --git a/t/50_foreign_key_info.t b/t/50_foreign_key_info.t index eaf32e2..05a2f86 100644 --- a/t/50_foreign_key_info.t +++ b/t/50_foreign_key_info.t @@ -12,7 +12,7 @@ BEGIN { } } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # SQL below freely adapted from http://www.sqlite.org/foreignkeys.htm ... # not the best datamodel in the world, but good enough for our tests. diff --git a/t/51_table_column_metadata.t b/t/51_table_column_metadata.t index 4312e41..f6a6d70 100644 --- a/t/51_table_column_metadata.t +++ b/t/51_table_column_metadata.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { if (!has_compile_option('ENABLE_COLUMN_METADATA')) { diff --git a/t/52_db_filename.t b/t/52_db_filename.t index 1fb43ce..228c815 100644 --- a/t/52_db_filename.t +++ b/t/52_db_filename.t @@ -6,7 +6,7 @@ use Test::More; BEGIN { requires_sqlite('3.7.10') } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; for my $func (@CALL_FUNCS) { { diff --git a/t/53_status.t b/t/53_status.t index 149f9f0..217b195 100644 --- a/t/53_status.t +++ b/t/53_status.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS has_sqlite/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(); { diff --git a/t/54_literal_txn.t b/t/54_literal_txn.t index 36ce2ec..e8ff959 100644 --- a/t/54_literal_txn.t +++ b/t/54_literal_txn.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(); diff --git a/t/55_statistics_info.t b/t/55_statistics_info.t index c89c5f2..ed69282 100644 --- a/t/55_statistics_info.t +++ b/t/55_statistics_info.t @@ -12,7 +12,7 @@ BEGIN { } } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my @sql_statements = split /\n\n/, <<__EOSQL__; CREATE TABLE a ( diff --git a/t/56_open_flags.t b/t/56_open_flags.t index f47b4c8..5370a2f 100644 --- a/t/56_open_flags.t +++ b/t/56_open_flags.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI; use DBD::SQLite; diff --git a/t/57_uri_filename.t b/t/57_uri_filename.t index 589b631..3b2f8c2 100644 --- a/t/57_uri_filename.t +++ b/t/57_uri_filename.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_sqlite('3.7.7') } 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 dbd5c87..618f028 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 @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI qw(:sql_types); # The following is by mje++ diff --git a/t/59_extended_result_codes.t b/t/59_extended_result_codes.t index fbcb4a5..2cc7def 100644 --- a/t/59_extended_result_codes.t +++ b/t/59_extended_result_codes.t @@ -10,7 +10,7 @@ BEGIN{ plan skip_all => 'this test requires SQLite 3.7.12 and above' unless $DBD::SQLite::sqlite_version_number > 3007011; } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBD::SQLite::Constants qw/:extended_result_codes :result_codes/; use File::Temp; diff --git a/t/60_readonly.t b/t/60_readonly.t index 48093ba..ad6a0e0 100644 --- a/t/60_readonly.t +++ b/t/60_readonly.t @@ -7,7 +7,7 @@ use DBD::SQLite::Constants qw/SQLITE_OPEN_READONLY/; BEGIN { requires_sqlite('3.7.11') } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; { my $dbh = connect_ok( diff --git a/t/61_strlike.t b/t/61_strlike.t index 1f55d3c..0825527 100644 --- a/t/61_strlike.t +++ b/t/61_strlike.t @@ -7,7 +7,7 @@ use DBD::SQLite; BEGIN { requires_sqlite('3.10.0'); } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; ok !DBD::SQLite::strlike("foo_bar", "FOO1BAR"); ok !DBD::SQLite::strlike("foo_bar", "FOO_BAR"); diff --git a/t/62_regexp_multibyte_char_class.t b/t/62_regexp_multibyte_char_class.t index 99f4308..6e13a67 100644 --- a/t/62_regexp_multibyte_char_class.t +++ b/t/62_regexp_multibyte_char_class.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -#use Test::FailWarnings; # see RT#112220 +#use if -d ".git", "Test::FailWarnings"; # see RT#112220 BEGIN { requires_unicode_support() } diff --git a/t/63_param_values.t b/t/63_param_values.t index 3f7b743..bb8a970 100644 --- a/t/63_param_values.t +++ b/t/63_param_values.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1 ); ok $dbh->do('create table foo (id integer, value integer)'); diff --git a/t/64_limit.t b/t/64_limit.t index 318be4f..b4dbeb3 100644 --- a/t/64_limit.t +++ b/t/64_limit.t @@ -4,7 +4,7 @@ use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; use DBD::SQLite::Constants qw/SQLITE_LIMIT_VARIABLE_NUMBER/; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; for my $func (@CALL_FUNCS) { my $dbh = connect_ok(PrintError => 0, RaiseError => 1); diff --git a/t/65_db_config.t b/t/65_db_config.t index 56c11ca..ff4f93c 100644 --- a/t/65_db_config.t +++ b/t/65_db_config.t @@ -4,7 +4,7 @@ use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; use DBD::SQLite::Constants qw/:database_connection_configuration_options/; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # LOOKASIDE for my $func (@CALL_FUNCS) { diff --git a/t/cookbook_variance.t b/t/cookbook_variance.t index 9d4de46..532f403 100644 --- a/t/cookbook_variance.t +++ b/t/cookbook_variance.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # The following snippets are copied from Cookbook.pod by hand. # Don't forget to update here when the pod is updated. diff --git a/t/rt_106151_outermost_savepoint.t b/t/rt_106151_outermost_savepoint.t index a117aa4..6212747 100644 --- a/t/rt_106151_outermost_savepoint.t +++ b/t/rt_106151_outermost_savepoint.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_sqlite('3.6.8') } diff --git a/t/rt_106950_extra_warnings_with_savepoints.t b/t/rt_106950_extra_warnings_with_savepoints.t index 79561f5..1ad0f61 100644 --- a/t/rt_106950_extra_warnings_with_savepoints.t +++ b/t/rt_106950_extra_warnings_with_savepoints.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_sqlite('3.6.8') } diff --git a/t/rt_115465_column_info_with_spaces.t b/t/rt_115465_column_info_with_spaces.t index 32ce4c0..13c1bf6 100644 --- a/t/rt_115465_column_info_with_spaces.t +++ b/t/rt_115465_column_info_with_spaces.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; { my $dbh = connect_ok(); diff --git a/t/rt_124227_index_regression.t b/t/rt_124227_index_regression.t index 6ad4049..e63bef5 100644 --- a/t/rt_124227_index_regression.t +++ b/t/rt_124227_index_regression.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $sql_in_question = <<'EOS'; SELECT cdid diff --git a/t/rt_15186_prepcached.t b/t/rt_15186_prepcached.t index dc945aa..db823c9 100644 --- a/t/rt_15186_prepcached.t +++ b/t/rt_15186_prepcached.t @@ -7,7 +7,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create a database my $dbh = connect_ok( RaiseError => 1 ); diff --git a/t/rt_21406_auto_finish.t b/t/rt_21406_auto_finish.t index 7ca4c5c..05a3037 100644 --- a/t/rt_21406_auto_finish.t +++ b/t/rt_21406_auto_finish.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; SCOPE: { my $dbh = connect_ok( RaiseError => 1 ); diff --git a/t/rt_25371_asymmetric_unicode.t b/t/rt_25371_asymmetric_unicode.t index 711c5ed..ef1e978 100644 --- a/t/rt_25371_asymmetric_unicode.t +++ b/t/rt_25371_asymmetric_unicode.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_unicode_support(); } diff --git a/t/rt_25460_numeric_aggregate.t b/t/rt_25460_numeric_aggregate.t index f1e0804..0f715fe 100644 --- a/t/rt_25460_numeric_aggregate.t +++ b/t/rt_25460_numeric_aggregate.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create the table my $dbh = connect_ok(); diff --git a/t/rt_25924_user_defined_func_unicode.t b/t/rt_25924_user_defined_func_unicode.t index 20bafcd..a2845ae 100644 --- a/t/rt_25924_user_defined_func_unicode.t +++ b/t/rt_25924_user_defined_func_unicode.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_unicode_support() } diff --git a/t/rt_26775_distinct.t b/t/rt_26775_distinct.t index 018729e..ff2411c 100644 --- a/t/rt_26775_distinct.t +++ b/t/rt_26775_distinct.t @@ -4,7 +4,7 @@ use DBI; use Test::More; use lib "t/lib"; use SQLiteTest; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_sqlite('3.6.3') } diff --git a/t/rt_27553_prepared_cache_and_analyze.t b/t/rt_27553_prepared_cache_and_analyze.t index 2fcbfca..0bc93a7 100644 --- a/t/rt_27553_prepared_cache_and_analyze.t +++ b/t/rt_27553_prepared_cache_and_analyze.t @@ -4,7 +4,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, AutoCommit => 1 ); diff --git a/t/rt_29058_group_by.t b/t/rt_29058_group_by.t index a9e1283..13307ab 100644 --- a/t/rt_29058_group_by.t +++ b/t/rt_29058_group_by.t @@ -4,7 +4,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI qw(:sql_types); my $dbh = connect_ok(); diff --git a/t/rt_29629_sqlite_where_length.t b/t/rt_29629_sqlite_where_length.t index d9209e5..76aaf72 100644 --- a/t/rt_29629_sqlite_where_length.t +++ b/t/rt_29629_sqlite_where_length.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI qw(:sql_types); my $dbh = connect_ok(); diff --git a/t/rt_31324_full_names.t b/t/rt_31324_full_names.t index eee5492..afdb55a 100644 --- a/t/rt_31324_full_names.t +++ b/t/rt_31324_full_names.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1 ); $dbh->do("CREATE TABLE f (f1, f2, f3)"); diff --git a/t/rt_32889_prepare_cached_reexecute.t b/t/rt_32889_prepare_cached_reexecute.t index 7322eb9..c2a2a8f 100644 --- a/t/rt_32889_prepare_cached_reexecute.t +++ b/t/rt_32889_prepare_cached_reexecute.t @@ -7,7 +7,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create the table SCOPE: { diff --git a/t/rt_36836_duplicate_key.t b/t/rt_36836_duplicate_key.t index 9aed085..43ec458 100644 --- a/t/rt_36836_duplicate_key.t +++ b/t/rt_36836_duplicate_key.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # Create a database my $dbh = connect_ok( PrintError => 0 ); diff --git a/t/rt_36838_unique_and_bus_error.t b/t/rt_36838_unique_and_bus_error.t index f47a631..ee8b397 100644 --- a/t/rt_36838_unique_and_bus_error.t +++ b/t/rt_36838_unique_and_bus_error.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, PrintError => 0 ); diff --git a/t/rt_40594_nullable.t b/t/rt_40594_nullable.t index 5477502..086031b 100644 --- a/t/rt_40594_nullable.t +++ b/t/rt_40594_nullable.t @@ -4,7 +4,7 @@ use Test::More; use lib "t/lib"; use SQLiteTest; use DBD::SQLite; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { if (!has_compile_option('ENABLE_COLUMN_METADATA')) { diff --git a/t/rt_48393_debug_panic_with_commit.t b/t/rt_48393_debug_panic_with_commit.t index 30f6026..39cfdcd 100644 --- a/t/rt_48393_debug_panic_with_commit.t +++ b/t/rt_48393_debug_panic_with_commit.t @@ -11,7 +11,7 @@ BEGIN { unless $ENV{TEST_DBD_SQLITE_WITH_DEBUGGER}; } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $file = 't/panic.pl'; open my $fh, '>', $file; diff --git a/t/rt_50503_fts3.t b/t/rt_50503_fts3.t index 55750bb..5d49e99 100644 --- a/t/rt_50503_fts3.t +++ b/t/rt_50503_fts3.t @@ -9,7 +9,7 @@ BEGIN { plan skip_all => "FTS is disabled for this DBD::SQLite" unless has_fts(); } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, AutoCommit => 0 ); diff --git a/t/rt_52573_manual_exclusive_lock.t b/t/rt_52573_manual_exclusive_lock.t index a85d0a5..01954cd 100644 --- a/t/rt_52573_manual_exclusive_lock.t +++ b/t/rt_52573_manual_exclusive_lock.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( AutoCommit => 1, diff --git a/t/rt_53235_icu_compatibility.t b/t/rt_53235_icu_compatibility.t index 63ec8ea..1808b9f 100644 --- a/t/rt_53235_icu_compatibility.t +++ b/t/rt_53235_icu_compatibility.t @@ -8,7 +8,7 @@ BEGIN { plan( skip_all => 'requires SQLite ICU plugin to be enabled' ); } } -# use Test::FailWarnings; +# use if -d ".git", "Test::FailWarnings"; my @isochars = (ord("K"), 0xf6, ord("n"), ord("i"), ord("g")); my $koenig = pack("U*", @isochars); diff --git a/t/rt_62370_diconnected_handles_operation.t b/t/rt_62370_diconnected_handles_operation.t index ba3e59a..a18e1a4 100644 --- a/t/rt_62370_diconnected_handles_operation.t +++ b/t/rt_62370_diconnected_handles_operation.t @@ -4,7 +4,7 @@ use lib "t/lib"; use SQLiteTest qw/connect_ok @CALL_FUNCS/; use Test::More; use DBD::SQLite; -#use Test::FailWarnings; +#use if -d ".git", "Test::FailWarnings"; my @methods = qw( commit rollback diff --git a/t/rt_64177_ping_wipes_out_the_errstr.t b/t/rt_64177_ping_wipes_out_the_errstr.t index 2f287c8..887f466 100644 --- a/t/rt_64177_ping_wipes_out_the_errstr.t +++ b/t/rt_64177_ping_wipes_out_the_errstr.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(RaiseError => 1, PrintError => 0); eval { $dbh->do('foobar') }; diff --git a/t/rt_67581_bind_params_mismatch.t b/t/rt_67581_bind_params_mismatch.t index 4907b87..23a905e 100644 --- a/t/rt_67581_bind_params_mismatch.t +++ b/t/rt_67581_bind_params_mismatch.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI qw/:sql_types/; my $id = 0; diff --git a/t/rt_71311_bind_col_and_unicode.t b/t/rt_71311_bind_col_and_unicode.t index 44e85b6..5a9482f 100644 --- a/t/rt_71311_bind_col_and_unicode.t +++ b/t/rt_71311_bind_col_and_unicode.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI qw/:sql_types/; BEGIN{ requires_unicode_support(); } diff --git a/t/rt_73159_fts_tokenizer_segfault.t b/t/rt_73159_fts_tokenizer_segfault.t index b1a3a76..738f0a8 100644 --- a/t/rt_73159_fts_tokenizer_segfault.t +++ b/t/rt_73159_fts_tokenizer_segfault.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI; my $dbh = connect_ok(RaiseError => 1, PrintError => 0); diff --git a/t/rt_73787_exponential_buffer_overflow.t b/t/rt_73787_exponential_buffer_overflow.t index 3e83add..ce571bb 100644 --- a/t/rt_73787_exponential_buffer_overflow.t +++ b/t/rt_73787_exponential_buffer_overflow.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(sqlite_see_if_its_a_number => 1); $dbh->do('create table foo (id integer primary key, exp)'); diff --git a/t/rt_76395_int_overflow.t b/t/rt_76395_int_overflow.t index df36491..a74f67b 100644 --- a/t/rt_76395_int_overflow.t +++ b/t/rt_76395_int_overflow.t @@ -4,7 +4,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI; diff --git a/t/rt_77724_primary_key_with_a_whitespace.t b/t/rt_77724_primary_key_with_a_whitespace.t index 313d5fa..65ca9f3 100644 --- a/t/rt_77724_primary_key_with_a_whitespace.t +++ b/t/rt_77724_primary_key_with_a_whitespace.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(RaiseError => 1, PrintError => 0); diff --git a/t/rt_78833_utf8_flag_for_column_names.t b/t/rt_78833_utf8_flag_for_column_names.t index 39d3f52..a8c16b0 100644 --- a/t/rt_78833_utf8_flag_for_column_names.t +++ b/t/rt_78833_utf8_flag_for_column_names.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use Encode; BEGIN { requires_unicode_support() } diff --git a/t/rt_81536_multi_column_primary_key_info.t b/t/rt_81536_multi_column_primary_key_info.t index f5bf44b..616e0f2 100644 --- a/t/rt_81536_multi_column_primary_key_info.t +++ b/t/rt_81536_multi_column_primary_key_info.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # single column integer primary key { diff --git a/t/rt_88228_sqlite_3_8_0_crash.t b/t/rt_88228_sqlite_3_8_0_crash.t index 0386dce..3248210 100644 --- a/t/rt_88228_sqlite_3_8_0_crash.t +++ b/t/rt_88228_sqlite_3_8_0_crash.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(); 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 e8e6914..1569966 100644 --- a/t/rt_96050_db_filename_for_a_closed_database.t +++ b/t/rt_96050_db_filename_for_a_closed_database.t @@ -5,7 +5,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, PrintError => 0 ); for my $func (@CALL_FUNCS) { diff --git a/t/rt_96877_unicode_statements.t b/t/rt_96877_unicode_statements.t index c07f1b3..2129186 100644 --- a/t/rt_96877_unicode_statements.t +++ b/t/rt_96877_unicode_statements.t @@ -7,7 +7,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_unicode_support() } diff --git a/t/rt_96878_fts_contentless_table.t b/t/rt_96878_fts_contentless_table.t index 194b0b9..651b911 100644 --- a/t/rt_96878_fts_contentless_table.t +++ b/t/rt_96878_fts_contentless_table.t @@ -9,7 +9,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use DBI qw/SQL_INTEGER/; BEGIN { requires_sqlite('3.7.9') } 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 ea2c836..81e658d 100644 --- a/t/rt_97598_crash_on_disconnect_with_virtual_tables.t +++ b/t/rt_97598_crash_on_disconnect_with_virtual_tables.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_sqlite('3.7.7') } BEGIN { plan skip_all => 'FTS is disabled for this DBD::SQLite' unless has_fts() } diff --git a/t/virtual_table/00_base.t b/t/virtual_table/00_base.t index d0ba803..de46722 100644 --- a/t/virtual_table/00_base.t +++ b/t/virtual_table/00_base.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok $sqlite_call/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, PrintError => 0, AutoCommit => 1 ); diff --git a/t/virtual_table/01_destroy.t b/t/virtual_table/01_destroy.t index da14d5d..aff6b6b 100644 --- a/t/virtual_table/01_destroy.t +++ b/t/virtual_table/01_destroy.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok $sqlite_call/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbfile = "tmp.sqlite"; diff --git a/t/virtual_table/02_find_function.t b/t/virtual_table/02_find_function.t index b576409..b7eee2d 100644 --- a/t/virtual_table/02_find_function.t +++ b/t/virtual_table/02_find_function.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok $sqlite_call/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok( RaiseError => 1, PrintError => 0, AutoCommit => 1 ); diff --git a/t/virtual_table/10_filecontent.t b/t/virtual_table/10_filecontent.t index a94428a..eb452ab 100644 --- a/t/virtual_table/10_filecontent.t +++ b/t/virtual_table/10_filecontent.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok $sqlite_call/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use FindBin; plan skip_all => "\$FindBin::Bin points to a nonexistent path for some reason: $FindBin::Bin" if !-d $FindBin::Bin; diff --git a/t/virtual_table/11_filecontent_fulltext.t b/t/virtual_table/11_filecontent_fulltext.t index 4aacf00..b16e87e 100644 --- a/t/virtual_table/11_filecontent_fulltext.t +++ b/t/virtual_table/11_filecontent_fulltext.t @@ -4,7 +4,7 @@ use FindBin; use lib "t/lib"; use SQLiteTest; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; BEGIN { requires_sqlite('3.7.12') } diff --git a/t/virtual_table/20_perldata.t b/t/virtual_table/20_perldata.t index 306bcbb..c83ad80 100644 --- a/t/virtual_table/20_perldata.t +++ b/t/virtual_table/20_perldata.t @@ -6,7 +6,7 @@ use Test::More; BEGIN { requires_sqlite('3.7.4') } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; use FindBin; our $perl_rows = [ diff --git a/t/virtual_table/21_perldata_charinfo.t b/t/virtual_table/21_perldata_charinfo.t index 102ffee..172f85b 100644 --- a/t/virtual_table/21_perldata_charinfo.t +++ b/t/virtual_table/21_perldata_charinfo.t @@ -14,7 +14,7 @@ BEGIN { } } -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; our $chars = [map {charinfo($_)} 0x300..0x400]; diff --git a/t/virtual_table/rt_124941.t b/t/virtual_table/rt_124941.t index 9aa533e..026f04c 100644 --- a/t/virtual_table/rt_124941.t +++ b/t/virtual_table/rt_124941.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok $sqlite_call has_sqlite/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; my $dbh = connect_ok(sqlite_trace => 2); # register the module and declare the virtual table diff --git a/t/virtual_table/rt_99748.t b/t/virtual_table/rt_99748.t index 78fb2e9..4d3ac38 100644 --- a/t/virtual_table/rt_99748.t +++ b/t/virtual_table/rt_99748.t @@ -3,7 +3,7 @@ use warnings; use lib "t/lib"; use SQLiteTest qw/connect_ok $sqlite_call has_sqlite/; use Test::More; -use Test::FailWarnings; +use if -d ".git", "Test::FailWarnings"; # tests that the MATCH operator does not allow code injection my @interpolation_attempts = (