aboutsummaryrefslogtreecommitdiff
path: root/test/json102.test
diff options
context:
space:
mode:
authordrh <>2023-05-01 18:28:48 +0000
committerdrh <>2023-05-01 18:28:48 +0000
commitabdcfcef83991c6dba82befbc6683441ffb6619f (patch)
tree73d5116978e22b40e44bbe00d91b2358408ab278 /test/json102.test
parent5ecee3dae30dc88248f501868dca975582a77f42 (diff)
parente210c9390321379f9a5c0b7a205e67128ab12192 (diff)
downloadsqlite-abdcfcef83991c6dba82befbc6683441ffb6619f.tar.gz
sqlite-abdcfcef83991c6dba82befbc6683441ffb6619f.zip
Add support for JSON5.
FossilOrigin-Name: f8c3ed23a6931b1da3b93b3274b132387078112a5c8e8d06b5312c47987d3937
Diffstat (limited to 'test/json102.test')
-rw-r--r--test/json102.test33
1 files changed, 21 insertions, 12 deletions
diff --git a/test/json102.test b/test/json102.test
index f551c4b82..bfd5e7ed0 100644
--- a/test/json102.test
+++ b/test/json102.test
@@ -301,18 +301,27 @@ for {set i 0} {$i<100} {incr i} {
# allowing them. The following tests verify that the problem is now
# fixed.
#
-do_execsql_test json102-1401 { SELECT json_valid('{"x":01}') } 0
-do_execsql_test json102-1402 { SELECT json_valid('{"x":-01}') } 0
-do_execsql_test json102-1403 { SELECT json_valid('{"x":0}') } 1
-do_execsql_test json102-1404 { SELECT json_valid('{"x":-0}') } 1
-do_execsql_test json102-1405 { SELECT json_valid('{"x":0.1}') } 1
-do_execsql_test json102-1406 { SELECT json_valid('{"x":-0.1}') } 1
-do_execsql_test json102-1407 { SELECT json_valid('{"x":0.0000}') } 1
-do_execsql_test json102-1408 { SELECT json_valid('{"x":-0.0000}') } 1
-do_execsql_test json102-1409 { SELECT json_valid('{"x":01.5}') } 0
-do_execsql_test json102-1410 { SELECT json_valid('{"x":-01.5}') } 0
-do_execsql_test json102-1411 { SELECT json_valid('{"x":00}') } 0
-do_execsql_test json102-1412 { SELECT json_valid('{"x":-00}') } 0
+foreach {id j x0 x5} {
+ 1401 {'{"x":01}'} 0 0
+ 1402 {'{"x":-01}'} 0 0
+ 1403 {'{"x":0}'} 1 1
+ 1404 {'{"x":-0}'} 1 1
+ 1405 {'{"x":0.1}'} 1 1
+ 1406 {'{"x":-0.1}'} 1 1
+ 1407 {'{"x":0.0000}'} 1 1
+ 1408 {'{"x":-0.0000}'} 1 1
+ 1409 {'{"x":01.5}'} 0 0
+ 1410 {'{"x":-01.5}'} 0 0
+ 1411 {'{"x":00}'} 0 0
+ 1412 {'{"x":-00}'} 0 0
+ 1413 {'{"x":+0}'} 0 1
+ 1414 {'{"x":+5}'} 0 1
+ 1415 {'{"x":+5.5}'} 0 1
+} {
+ do_execsql_test json102-$id "
+ SELECT json_valid($j), NOT json_error_position($j);
+ " [list $x0 $x5]
+}
#------------------------------------------------------------------------
# 2017-04-10 ticket 6c9b5514077fed34551f98e64c09a10dc2fc8e16