1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

try Encode for older perls

This commit is contained in:
Kenichi Ishigaki 2016-02-20 10:33:14 +09:00
parent 95bd200674
commit 8a50806e17

View file

@ -12,6 +12,9 @@ BEGIN {
if ($] < 5.008005) {
plan skip_all => 'Unicode is not supported before 5.8.5';
}
if (!eval "require Encode; 1") {
plan skip_all => 'requires Encode for this test';
}
}
use Test::NoWarnings;
@ -34,8 +37,8 @@ foreach my $call_func (@CALL_FUNCS) {
my @vals = @words;
my $re = $regex;
if ($use_unicode) {
utf8::decode($_) foreach @vals;
utf8::decode($re);
@vals = map {Encode::decode_utf8($_)} @vals;
$re = Encode::decode_utf8($re);
}
$dbh->do( 'CREATE TEMP TABLE regexp_test ( txt )' );