mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 22:58:17 -04:00
DBD-SQLite: added a test for RT #36838; seems no problem for me, though
This commit is contained in:
parent
9af168bc3c
commit
0dd41aefb3
1 changed files with 19 additions and 0 deletions
19
t/rt_36838_unique_and_bus_error.t
Normal file
19
t/rt_36838_unique_and_bus_error.t
Normal 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
|
Loading…
Add table
Reference in a new issue