limbo/testing
Preston Thorpe fd2a03dbdc
Merge 'fix: JSON_INSERT now correctly inserts new keys in nested objects' from Mikaël Francoeur
Some of the tests that were added pass only on this branch. I was
surprised to see that there didn't seem to be any TCL tests for
`json_insert()`.
## AI-generated description
When using JSON_INSERT with a path like '$.a.b.d' on an object like
'{"a": {"b": {"c": 5}}}', the function was incorrectly returning the
input unchanged instead of inserting the new key.
The root cause was that InsertNew mode was being applied to all path
segments. The fix uses Upsert mode for intermediate segments and only
applies InsertNew for the final segment.
🤖 Generated with [Claude Code](https://claude.com/claude-code), and
cleaned up by Mikaël
## AI Disclosure
This was written by Claude, and then I cleaned it up manually.

Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #4166
2025-12-10 14:55:07 -05:00
..
cli_tests Add more py tests for hash joins 2025-12-04 16:09:47 -05:00
javascript fix tests in testing/javascript 2025-09-25 12:07:57 +04:00
sqlite3
sqlite_test_ext
test_files
unreliable-libc Add short writes to pwritev in faulty_libc. 2025-10-03 18:35:03 +02:00
wal
affinity.test Add regression test for rowid affinity 2025-10-02 14:31:22 -04:00
agg-functions.test printf truncates floats 2025-09-28 21:16:33 +05:30
all-mvcc.test tcl,makefile: add tcl test infraestructure for mvcc 2025-12-08 18:05:45 +01:00
all.test Add a truckload of AI-generated TCL tests for RETURNING 2025-11-13 10:32:38 +02:00
alter_column.test feat: alter table disallow generated columns, support foreign keys for alter table 2025-11-08 13:45:17 +05:30
alter_table.test Add regression tcl test for #3886 2025-11-03 09:47:28 -05:00
analyze.test Add/expand tcl tests for analyze 2025-12-09 20:02:07 -05:00
attach.test Add regression test for #3540 attach issue 2025-10-06 21:33:42 -04:00
autoincr.test tcl,makefile: add tcl test infraestructure for mvcc 2025-12-08 18:05:45 +01:00
boolean.test
changes.test Add 'make test-single' 2025-10-30 11:38:56 +02:00
cmdlineshell.test
coalesce.test
collate.test Collate: add more TCL tests 2025-10-02 21:49:33 +03:00
compare.test Add 'make test-single' 2025-10-30 11:38:56 +02:00
concat.test Add 'make test-single' 2025-10-30 11:38:56 +02:00
create_index.test Prevent creating index on rowid pseudo-column 2025-12-06 16:10:51 -05:00
create_table.test Add regression tcl test for #3796 default bool col constraints 2025-10-21 21:22:09 -04:00
default_value.test Add 'make test-single' 2025-10-30 11:38:56 +02:00
delete.test
drop_index.test
drop_table.test fix: prevent DROP TABLE when table is referenced by foreign keys 2025-11-04 12:32:19 -03:00
foreign_keys.test dont validate fkey on parent add tests 2025-11-16 09:41:57 +05:30
gen-bigass-database.py
gen-database.py
glob.test Add 'make test-single' 2025-10-30 11:38:56 +02:00
groupby.test fix: result columns have varying binding precedence 2025-09-25 08:07:37 +03:00
insert.test run BEFORE and AFTER update triggers on upserts 2025-12-06 15:20:24 -05:00
integrity_check.test Add 'make test-single' 2025-10-30 11:38:56 +02:00
join.test Add some additional join tests with nulls for new bloom filter behavior 2025-12-04 16:09:49 -05:00
json.test fix: JSON_INSERT now correctly inserts new keys in nested objects 2025-12-10 13:58:58 -05:00
like.test Added tests 2025-11-18 22:14:09 +05:30
literal.test
materialized_views.test Fix: Drop internal DBSP table when dropping materialized view 2025-11-08 20:28:20 +01:00
math.test is_nonnull returns true on 1 / 0 2025-09-17 14:50:15 +07:00
null.test Fix descending index scan returning rows when seek key is NULL 2025-12-08 13:19:58 +02:00
offset.test Fix expected error message 2025-10-15 09:41:44 +03:00
orderby.test Merge branch 'main' into order-by-heap-sort 2025-10-22 11:44:55 +04:00
partial_idx.test Add some tests for UPSERT with partial indexes 2025-09-20 18:32:50 -04:00
pragma.test add some tests 2025-12-05 19:44:28 -03:00
pyproject.toml
README.md
returning.test AI-generated tests for DELETE RETURNING 2025-11-14 13:35:24 +02:00
rollback.test
scalar-functions-datetime.test
scalar-functions-printf.test Add 'make test-single' 2025-10-30 11:38:56 +02:00
scalar-functions.test Add TCL tests for quote scalar function w/ blob type 2025-11-27 20:59:23 -05:00
select.test add some tests 2025-12-05 19:44:28 -03:00
subquery.test Fix EXISTS on LEFT JOIN null rows 2025-11-04 22:01:18 +07:00
tester.tcl tcl,makefile: add tcl test infraestructure for mvcc 2025-12-08 18:05:45 +01:00
testing.db
testing_norowidalias.db
testing_small.db
testing_user_version_10.db
time.test
total-changes.test Add 'make test-single' 2025-10-30 11:38:56 +02:00
transactions.test
trigger.test adding tests 2025-11-29 23:04:32 +05:30
update.test Add tcl tests for expr indexes and collation 2025-11-20 12:47:49 -05:00
upsert.test Add tcl tests for expr indexes and collation 2025-11-20 12:47:49 -05:00
values.test tests passing 2025-11-23 13:04:44 +05:30
vector.test added tcl tests 2025-12-06 00:01:17 +05:30
views.test Remove tests that alter testing.db from views.test 2025-10-18 12:05:33 -04:00
vtab.test
where.test fix: result columns have varying binding precedence 2025-09-25 08:07:37 +03:00
window.test Add support for window functions 2025-09-13 11:12:44 +02:00

Turso Testing

Testing Extensions

When adding tests for extensions, please follow these guidelines:

  • Tests that verify the internal logic or behavior of a particular extension should go into cli_tests/extensions.py.
  • Tests that verify how extensions interact with the database engine, such as virtual table handling, should be written in TCL (see vtab.test as an example).

To check which extensions are available in TCL, or to add a new one, refer to the tester.tcl file and look at the extension_map.