mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
error messages have been slightly changed since 3.8.2
This commit is contained in:
parent
2770389891
commit
f8a45b96f6
3 changed files with 4 additions and 4 deletions
|
@ -28,4 +28,4 @@ eval {
|
|||
};
|
||||
ok($@, 'Statement 2 generated an error');
|
||||
is( $DBI::err, 19, '$DBI::err ok' );
|
||||
like( $DBI::errstr, qr/column a is not unique/, '$DBI::errstr ok' );
|
||||
like( $DBI::errstr, qr/column a is not unique|UNIQUE constraint failed/, '$DBI::errstr ok' );
|
||||
|
|
|
@ -49,7 +49,7 @@ ok insert_track(13, "My Way", 2);
|
|||
# column (3) does not correspond to row in the artist table.
|
||||
|
||||
ok !insert_track(14, "Mr. Bojangles", 3);
|
||||
ok $@ =~ qr/foreign key constraint failed/;
|
||||
ok $@ =~ qr/foreign key constraint failed/i;
|
||||
|
||||
# This succeeds because a NULL is inserted into trackartist. A
|
||||
# corresponding row in the artist table is not required in this case.
|
||||
|
@ -62,7 +62,7 @@ ok insert_track(14, "Mr. Bojangles", undef);
|
|||
# artist table.
|
||||
|
||||
ok !update_track(3, "Mr. Bojangles");
|
||||
ok $@ =~ /foreign key constraint failed/;
|
||||
ok $@ =~ /foreign key constraint failed/i;
|
||||
|
||||
# Insert the required row into the artist table. It is then possible
|
||||
# to update the inserted row to set trackartist to 3 (since a
|
||||
|
|
|
@ -17,4 +17,4 @@ $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
|
||||
ok $@ =~ /column num is not unique|UNIQUE constraint failed/, $@; # should not be a bus error
|
||||
|
|
Loading…
Add table
Reference in a new issue