diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2012-09-24 10:15:50 +0000 |
---|---|---|
committer | Lorry <lorry@roadtrain.codethink.co.uk> | 2012-09-26 13:46:46 +0000 |
commit | 485b97be9f2f2abf5a40923b5fd85f75714a8c02 (patch) | |
tree | ca05cb0ecf3828d909a898c3e5805804a0aff5f8 /t/rt_73787_exponential_buffer_overflow.t | |
download | perl-dbd-sqlite-tarball-master.tar.gz |
Imported from /srv/lorry/lorry-area/perl-dbd-sqlite-tarball/DBD-SQLite-1.38_01.tar.gz.HEADDBD-SQLite-1.38_01masterbaserock/morph
Diffstat (limited to 't/rt_73787_exponential_buffer_overflow.t')
-rw-r--r-- | t/rt_73787_exponential_buffer_overflow.t | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/rt_73787_exponential_buffer_overflow.t b/t/rt_73787_exponential_buffer_overflow.t new file mode 100644 index 0000000..6115864 --- /dev/null +++ b/t/rt_73787_exponential_buffer_overflow.t @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +use strict; +BEGIN { + $| = 1; + $^W = 1; +} + +use t::lib::Test qw/connect_ok/; +use Test::More tests => 6; +use Test::NoWarnings; + +my $dbh = connect_ok(sqlite_see_if_its_a_number => 1); +$dbh->do('create table foo (id integer primary key, exp)'); +my $ct = 0; +for my $value (qw/2e100 10.04e100/) { + eval { + $dbh->do('insert into foo values (?, ?)', undef, $ct++, $value); + my $got = $dbh->selectrow_arrayref('select * from foo where exp = ?', undef, $value); + is $value => $got->[1], "got ".$got->[0]; + }; + ok !$@, "and without errors"; +} |