aboutsummaryrefslogtreecommitdiff
path: root/test/json101.test
diff options
context:
space:
mode:
authordrh <>2023-10-02 13:20:43 +0000
committerdrh <>2023-10-02 13:20:43 +0000
commit8eeafb754459486a530ec3264cde5587793522d7 (patch)
treed8db5a4222ae436ccaa7bbaecd5f6d2ea4b960fb /test/json101.test
parent5624b0b4cd997f749511fdb62cca63602f0cb079 (diff)
downloadsqlite-8eeafb754459486a530ec3264cde5587793522d7.tar.gz
sqlite-8eeafb754459486a530ec3264cde5587793522d7.zip
Improvements to error handling for BLOB inputs on JSON.
FossilOrigin-Name: 14f20ecbfab44934e86f1ac7a3f745b989aa8190c6df119ff5aa8100fa248d93
Diffstat (limited to 'test/json101.test')
-rw-r--r--test/json101.test6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/json101.test b/test/json101.test
index 5a7d770dd..5bf663560 100644
--- a/test/json101.test
+++ b/test/json101.test
@@ -86,13 +86,15 @@ do_execsql_test json101-2.2.3 {
do_execsql_test json101-2.2.3b {
SELECT json(jsonb_object('a',jsonb_array('xyx',77,4.5),'x',2.5));
} {{{"a":["xyx",77,4.5],"x":2.5}}}
-exit
do_catchsql_test json101-2.3 {
SELECT json_object('a',1,'b');
} {1 {json_object() requires an even number of arguments}}
do_catchsql_test json101-2.4 {
SELECT json_object('a',printf('%.1000c','x'),'b',x'abcd');
} {1 {JSON cannot hold BLOB values}}
+do_execsql_test json101-2.5 {
+ SELECT json_object('a',printf('%.10c','x'),'b',jsonb_array(1,2,3));
+} {{{"a":"xxxxxxxxxx","b":[1,2,3]}}}
do_execsql_test json101-3.1 {
SELECT json_replace('{"a":1,"b":2}','$.a','[3,4,5]');
@@ -431,7 +433,7 @@ do_execsql_test json101-9.4 {
SELECT json_quote(null);
} {"null"}
do_catchsql_test json101-9.5 {
- SELECT json_quote(x'30313233');
+ SELECT json_quote(x'3031323334');
} {1 {JSON cannot hold BLOB values}}
do_catchsql_test json101-9.6 {
SELECT json_quote(123,456)