Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 111558
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: vlmarek [...] volny.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 1.48
  • 1.49_07
Fixed in: (no value)



Subject: Virtual table tests depend on enhanced query syntax availability
When sqlite is compiled without enhanced query syntax, the tests output error: t/virtual_table/11_filecontent_fulltext.t ............. 1/15 # Failed test 'search '"use strict" AND "use warnings"'' # at t/virtual_table/11_filecontent_fulltext.t line 79. # Structures begin differing at: # $got->[1] = 'lib/DBD/SQLite/VirtualTable.pm' # $expected->[1] = 'lib/DBD/SQLite/Constants.pm' # Failed test 'search '"use strict" AND "use warnings"' -- no lib/DBD/SQLite/VirtualTable.pm' # at t/virtual_table/11_filecontent_fulltext.t line 92. # Structures begin differing at: # $got->[1] = 'lib/DBD/SQLite/VirtualTable/FileContent.pm' # $expected->[1] = 'lib/DBD/SQLite/Constants.pm' # Failed test 'search '"use strict" AND "use warnings"' -- after reconnect' # at t/virtual_table/11_filecontent_fulltext.t line 105. # Structures begin differing at: # $got->[1] = 'lib/DBD/SQLite/VirtualTable/FileContent.pm' # $expected->[1] = 'lib/DBD/SQLite/Constants.pm' # Looks like you failed 3 tests of 15. t/virtual_table/11_filecontent_fulltext.t ............. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/15 subtests The problem is that the word 'AND' in term '"use strict" AND "use warnings"' is taken literally, and the file Constants.pm does not contain it. There are different ways of fixing the issue, I'm attaching patch I plan to use for Solaris distribution. It would be great to have it in official release. Thank you __ Vlad
Subject: fix_test.patch
--- DBD-SQLite-1.48/t/virtual_table/11_filecontent_fulltext.t 2016-01-29 16:02:04.277869372 -0800 +++ DBD-SQLite-1.48/t/virtual_table/11_filecontent_fulltext.t 2016-01-29 16:02:01.854470748 -0800 @@ -39,6 +39,14 @@ my @tests = ( ]], ); +# The last set of tests tries to use enhanced query syntax. But when SQLite is +# compiled without it's support, the work 'AND' is taken literally. The only +# file not containing word 'AND' is Constants.pm. +if ( not grep { $_ eq 'ENABLE_FTS3_PARENTHESIS' } DBD::SQLite::compile_options() ) { + my $arref = $tests[3]; + @$arref = grep { $_ ne 'lib/DBD/SQLite/Constants.pm' } @$arref; +} + plan tests => 3 + 3 * @tests; # find out perl files in this distrib
On Sat Jan 30 09:12:05 2016, neuron wrote: Show quoted text
> When sqlite is compiled without enhanced query syntax, the tests > output error: > > t/virtual_table/11_filecontent_fulltext.t ............. 1/15 > # Failed test 'search '"use strict" AND "use warnings"'' > # at t/virtual_table/11_filecontent_fulltext.t line 79. > # Structures begin differing at: > # $got->[1] = 'lib/DBD/SQLite/VirtualTable.pm' > # $expected->[1] = 'lib/DBD/SQLite/Constants.pm' > > # Failed test 'search '"use strict" AND "use warnings"' -- no > lib/DBD/SQLite/VirtualTable.pm' > # at t/virtual_table/11_filecontent_fulltext.t line 92. > # Structures begin differing at: > # $got->[1] = 'lib/DBD/SQLite/VirtualTable/FileContent.pm' > # $expected->[1] = 'lib/DBD/SQLite/Constants.pm' > > # Failed test 'search '"use strict" AND "use warnings"' -- after > reconnect' > # at t/virtual_table/11_filecontent_fulltext.t line 105. > # Structures begin differing at: > # $got->[1] = 'lib/DBD/SQLite/VirtualTable/FileContent.pm' > # $expected->[1] = 'lib/DBD/SQLite/Constants.pm' > # Looks like you failed 3 tests of 15. > t/virtual_table/11_filecontent_fulltext.t ............. Dubious, test > returned 3 (wstat 768, 0x300) > Failed 3/15 subtests > > > The problem is that the word 'AND' in term '"use strict" AND "use > warnings"' is taken literally, and the file Constants.pm does not > contain it. > > There are different ways of fixing the issue, I'm attaching patch I > plan to use for Solaris distribution. It would be great to have it in > official release. > > Thank you > __ > Vlad
Thanks for your report & patch. I'd rather skip the said test when the enhanced syntax is not available, because other .pm files might be added in the future. See https://github.com/DBD-SQLite/DBD-SQLite/commit/008e1291d5b3a8d1787433e33e6ebd13ed63af05 to find what is actually applied. Shipped 1.49_08 with the fix.
Closed as 1.50 was shipped. Thanks.
From: vlmarek [...] volny.cz
Show quoted text
> Closed as 1.50 was shipped. Thanks.
Thank you for your help here! __ Vlad