From a17b7f350fb4b07252eee2b43f41e0dbaa171f3d Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Sat, 30 Jan 2016 09:48:03 +0900 Subject: [PATCH] these tests should be skipped if DBD::SQLite is not compiled with FTS3/4 --- t/rt_96878_fts_contentless_table.t | 1 + t/rt_97598_crash_on_disconnect_with_virtual_tables.t | 1 + t/virtual_table/11_filecontent_fulltext.t | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/t/rt_96878_fts_contentless_table.t b/t/rt_96878_fts_contentless_table.t index ce0c988..369fdb6 100644 --- a/t/rt_96878_fts_contentless_table.t +++ b/t/rt_96878_fts_contentless_table.t @@ -16,6 +16,7 @@ use t::lib::Test; use Test::More; 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; 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 46045d5..072e7e1 100644 --- a/t/rt_97598_crash_on_disconnect_with_virtual_tables.t +++ b/t/rt_97598_crash_on_disconnect_with_virtual_tables.t @@ -10,6 +10,7 @@ use t::lib::Test; 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; diff --git a/t/virtual_table/11_filecontent_fulltext.t b/t/virtual_table/11_filecontent_fulltext.t index 804fafc..d62788b 100644 --- a/t/virtual_table/11_filecontent_fulltext.t +++ b/t/virtual_table/11_filecontent_fulltext.t @@ -10,10 +10,13 @@ use Test::More; BEGIN { requires_sqlite('3.7.12') } -use Test::NoWarnings; use FindBin; -plan skip_all => "\$FindBin::Bin points to a nonexistent path for some reason: $FindBin::Bin" if !-d $FindBin::Bin; +BEGIN { + plan skip_all => "\$FindBin::Bin points to a nonexistent path for some reason: $FindBin::Bin" if !-d $FindBin::Bin; + plan skip_all => 'FTS is disabled for this DBD::SQLite' if !grep /ENABLE_FTS3/, DBD::SQLite::compile_options(); +} +use Test::NoWarnings; my $dbfile = "tmp.sqlite";