mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-20 07:25:14 +01:00
add tests for tricky edge cases
This commit is contained in:
@@ -631,3 +631,15 @@ do_execsql_test json-patch-mixed-types-1 {
|
||||
'{"arr":[1,2,3],"obj":{"x":1}}'
|
||||
);
|
||||
} {{{"str":"hello","num":42,"bool":true,"arr":[1,2,3],"obj":{"x":1}}}}
|
||||
do_execsql_test json-patch-add-all-dup-keys-from-patch {
|
||||
select json_patch(
|
||||
'{"x":100,"x":200}',
|
||||
'{"z":{}, "z":5, "z":100}'
|
||||
);
|
||||
} {{{"x":100,"x":200,"z":{},"z":5,"z":100}}}
|
||||
do_execsql_test json-patch-first-occurance-patch {
|
||||
select json_patch(
|
||||
'{"x":100,"x":200}',
|
||||
'{"x":{}, "x":5, "x":100}'
|
||||
);
|
||||
} {{{"x":{},"x":200}}}
|
||||
|
||||
Reference in New Issue
Block a user