aboutsummaryrefslogtreecommitdiff
path: root/test/json502.test
diff options
context:
space:
mode:
authordrh <>2023-04-28 11:02:01 +0000
committerdrh <>2023-04-28 11:02:01 +0000
commit1170fb52e12c5476ac8cf03216609c6824953982 (patch)
treee044b9aa8d6f1ba1b6c91222c43678468b41f0c6 /test/json502.test
parentea2529528ef9f195bbf03c980eb254581aae2bcd (diff)
downloadsqlite-1170fb52e12c5476ac8cf03216609c6824953982.tar.gz
sqlite-1170fb52e12c5476ac8cf03216609c6824953982.zip
Fix json_tree() so that it is able to deal with the JNODE_RAW labels of
a JSON5 object. FossilOrigin-Name: f56528d413d8e622f7c4f18b2f9f2e620bfb441c020461299b35a90072ee6c13
Diffstat (limited to 'test/json502.test')
-rw-r--r--test/json502.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/json502.test b/test/json502.test
new file mode 100644
index 000000000..b5e570320
--- /dev/null
+++ b/test/json502.test
@@ -0,0 +1,25 @@
+# 2023-04-28
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#***********************************************************************
+# This file implements tests for the JSON5 enhancements to the
+# JSON SQL functions extension to the SQLite library.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+set testprefix json502
+
+do_execsql_test 1.1 {
+ CREATE TABLE t1(x JSON);
+ INSERT INTO t1(x) VALUES('{a:{b:{c:"hello",},},}');
+ SELECT fullkey FROM t1, json_tree(x);
+} {{$} {$.a} {$.a.b} {$.a.b.c}}
+
+finish_test