mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 06:38:12 -04:00
Adding failing test for the asymmetric unicode bug
This commit is contained in:
parent
788904db72
commit
690d7472f3
1 changed files with 27 additions and 0 deletions
27
t/rt_25371_asymmetric_unicode.t
Normal file
27
t/rt_25371_asymmetric_unicode.t
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
BEGIN {
|
||||
$| = 1;
|
||||
$^W = 1;
|
||||
}
|
||||
|
||||
use t::lib::Test;
|
||||
use Test::More tests => 15;
|
||||
use Test::NoWarnings;
|
||||
|
||||
my $dbh = connect_ok();
|
||||
$dbh->{unicode} = 1;
|
||||
|
||||
ok( $dbh->do(<<'END_SQL'), 'CREATE TABLE' );
|
||||
CREATE TABLE foo (
|
||||
bar varchar(255)
|
||||
)
|
||||
END_SQL
|
||||
|
||||
foreach ( "\0", "A", "\xe9", "\x{20ac}" ) {
|
||||
ok( $dbh->do("INSERT INTO foo VALUES ( ? )", {}, $_), 'INSERT' );
|
||||
my $foo = $dbh->selectall_arrayref("SELECT bar FROM foo");
|
||||
is_deeply( $foo, [ [ $_ ] ], 'Value round-tripped ok' );
|
||||
ok( $dbh->do("DELETE FROM foo"), 'DELETE ok' );
|
||||
}
|
Loading…
Add table
Reference in a new issue