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

DBD-SQLite: added a test for RT #36838; seems no problem for me, though

This commit is contained in:
Kenichi Ishigaki 2009-04-05 05:28:53 +00:00
parent 9af168bc3c
commit 0dd41aefb3

View file

@ -0,0 +1,19 @@
#!/usr/bin/perl
use strict;
BEGIN {
$| = 1;
$^W = 1;
}
use Test::More tests => 3;
use t::lib::Test;
my $dbh = connect_ok( RaiseError => 1 );
$dbh->do("CREATE TABLE nums (num INTEGER UNIQUE)");
ok $dbh->do("INSERT INTO nums (num) VALUES (?)", undef, 1);
eval { $dbh->do("INSERT INTO nums (num) VALUES (?)", undef, 1); };
ok $@ =~ /column num is not unique/, $@; # should not be a bus error