summaryrefslogtreecommitdiff
path: root/test/modeA.sql
diff options
context:
space:
mode:
authordrh <>2026-11-22 10:10:48 +0000
committerdrh <>2026-11-22 10:10:48 +0000
commit67d976a007c80251ba0df7ff22fb85e6964c8314 (patch)
tree810ac2ad1e598f2b1949bf2768bf1cb0f7b92918 /test/modeA.sql
parent9e7e99e39356aabd9148a102a11bf1573691d2c1 (diff)
downloadsqlite-master.tar.gz
sqlite-master.zip
Improvements to "json" mode in QRF.HEADlocal/sqlitemaster
[bugs:/info/2026-11-22T07:30:35Z|Bug 2026-11-22T07:30:35Z] FossilOrigin-Name: ac22af8bd58cb1f6190438cae90f607fe10b96094526b855cafeb84f8855ce05
Diffstat (limited to 'test/modeA.sql')
-rw-r--r--test/modeA.sql24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/modeA.sql b/test/modeA.sql
index bab29dce61..1ab403f76e 100644
--- a/test/modeA.sql
+++ b/test/modeA.sql
@@ -1270,3 +1270,27 @@ END
.mode --quote list
SELECT a, b FROM t1;
.check '<"x">|5'
+
+# Bug https://sqlite.org/bugs/forumpost/3ade505a97
+# BLOB values must be rendered validly in JSON and INSERT output even if
+# the text-quoting mode is changed.
+#
+.mode --reset json
+.mode --quote relaxed
+.testcase 1800
+SELECT -42 AS id, X'4142' AS raw;
+.check <<END
+[{"id":-42,"raw":"\u0041\u0042"}]
+END
+.mode --reset jobject
+.mode --quote sql
+.testcase 1810
+SELECT X'4142' AS raw;
+.check <<END
+{"raw":"\u0041\u0042"}
+END
+.mode --reset insert
+.mode --quote off
+.testcase 1820
+SELECT X'4142' AS raw;
+.check "INSERT INTO tab VALUES(x'4142');"