diff options
author | drh <drh@noemail.net> | 2018-05-16 12:19:11 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-05-16 12:19:11 +0000 |
commit | dd7460f0fd4232b9838a321a4655965af18bb551 (patch) | |
tree | 17130358fca19d2f5f2a00ae6dedf2e9ca0f395f /test/json101.test | |
parent | a44005af4f37148190e15f77d6702018a78c1718 (diff) | |
download | sqlite-dd7460f0fd4232b9838a321a4655965af18bb551.tar.gz sqlite-dd7460f0fd4232b9838a321a4655965af18bb551.zip |
Correct output for the fullkey column of json_each() when the total JSON
input is a simple value, not an array or object.
FossilOrigin-Name: b45b18850c59f22a163ee482f529f578a8798f96d0e26b5a061d336d480a1540
Diffstat (limited to 'test/json101.test')
-rw-r--r-- | test/json101.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/json101.test b/test/json101.test index ac4e11ebc..9a93ee739 100644 --- a/test/json101.test +++ b/test/json101.test @@ -784,5 +784,35 @@ do_execsql_test json-13.110 { WHERE Z.value==t2.id); } {3 {{"value":3}} 1 {{"items":[3,5]}} 5 {{"value":5}} 1 {{"items":[3,5]}}} +# 2018-05-16 +# Incorrect fullkey output from json_each() +# when the input JSON is not an array or object. +# +do_execsql_test json-14.100 { + SELECT fullkey FROM json_each('123'); +} {$} +do_execsql_test json-14.110 { + SELECT fullkey FROM json_each('123.56'); +} {$} +do_execsql_test json-14.120 { + SELECT fullkey FROM json_each('"hello"'); +} {$} +do_execsql_test json-14.130 { + SELECT fullkey FROM json_each('null'); +} {$} +do_execsql_test json-14.140 { + SELECT fullkey FROM json_tree('123'); +} {$} +do_execsql_test json-14.150 { + SELECT fullkey FROM json_tree('123.56'); +} {$} +do_execsql_test json-14.160 { + SELECT fullkey FROM json_tree('"hello"'); +} {$} +do_execsql_test json-14.170 { + SELECT fullkey FROM json_tree('null'); +} {$} + + finish_test |