From 13057c8013bede3e2bc2b5b0628bc5dd33b13649 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sat, 30 Aug 2025 08:52:05 +0300 Subject: [PATCH] testing: Improve insert.test for STRICT mode type case insensitivity --- testing/insert.test | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/testing/insert.test b/testing/insert.test index 409f75307..be321b149 100755 --- a/testing/insert.test +++ b/testing/insert.test @@ -19,12 +19,19 @@ do_execsql_test_on_specific_db {:memory:} must-be-int-insert { 4} do_execsql_test_on_specific_db {:memory:} strict-basic-creation { - create table test1 (id integer, name text, price real) strict; - insert into test1 values(1, 'item1', 10.5); - select * from test1; + CREATE TABLE test1 (id INTEGER, name TEXT, price REAL) STRICT; + INSERT INTO test1 VALUES(1, 'item1', 10.5); + SELECT * FROM test1; } {1|item1|10.5} -do_execsql_test_in_memory_any_error strict-require-datatype { +# Reproducer for https://github.com/tursodatabase/turso/issues/2822 +do_execsql_test_on_specific_db {:memory:} strict-type-case-insensitivity { + CREATE TABLE test1 (id integer, name text, price real) STRICT; + INSERT INTO test1 VALUES(1, 'item1', 10.5); + SELECT * FROM test1; +} {1|item1|10.5} + +do_execsql_test_in_memory_any_error strict-require-datatype { CREATE TABLE test2 (id INTEGER, name) STRICT; }