mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
add a test
This commit is contained in:
parent
9c2209faee
commit
46929ef1cb
1 changed files with 23 additions and 0 deletions
23
t/rt_44891_strings_look_like_numbers.t
Normal file
23
t/rt_44891_strings_look_like_numbers.t
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
BEGIN {
|
||||
$| = 1;
|
||||
$^W = 1;
|
||||
}
|
||||
|
||||
use t::lib::Test;
|
||||
use Test::More;
|
||||
use Test::NoWarnings;
|
||||
|
||||
plan tests => 9;
|
||||
|
||||
# no type specification
|
||||
my @values = qw/ 0 1 1.0 1.0e+001 /;
|
||||
for my $value (@values) {
|
||||
my $dbh = connect_ok( RaiseError => 1, AutoCommit => 1 );
|
||||
$dbh->do('create table foo (string)');
|
||||
$dbh->do('insert into foo values(?)', undef, $value);
|
||||
my ($got) = $dbh->selectrow_array('select string from foo where string = ?', undef, $value);
|
||||
ok defined $got && $got eq $value, "got: $got value: $value";
|
||||
}
|
Loading…
Add table
Reference in a new issue