diff options
author | drh <drh@noemail.net> | 2015-10-16 15:16:06 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-10-16 15:16:06 +0000 |
commit | b9e8f59b633dec4047a6ad092305be3a21cbc792 (patch) | |
tree | e41678eb3f9e548b5eb8850bc0e45ac078393714 /test/json101.test | |
parent | be37c12423417ea69bcf507908554667e9f750a0 (diff) | |
download | sqlite-b9e8f59b633dec4047a6ad092305be3a21cbc792.tar.gz sqlite-b9e8f59b633dec4047a6ad092305be3a21cbc792.zip |
Form-feed is not valid whitespace for json.
Fix for ticket [57eec374ae1d0a1d]
FossilOrigin-Name: 28957d635961c525f735a52b8ffe3e69ccf31382
Diffstat (limited to 'test/json101.test')
-rw-r--r-- | test/json101.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/json101.test b/test/json101.test index e11cdd013..8c62c8b16 100644 --- a/test/json101.test +++ b/test/json101.test @@ -324,5 +324,22 @@ do_execsql_test json-6.4 { SELECT json_valid('["a",55,"b",72]'); } {1} +# White-space tests. Note that form-feed is not white-space in JSON. +# ticket [57eec374ae1d0a1d4a23077a95f4e173fe269113] +# +foreach {tn isvalid ws} { + 7.1 1 char(0x20) + 7.2 1 char(0x09) + 7.3 1 char(0x0A) + 7.4 1 char(0x0D) + 7.5 0 char(0x0C) + 7.6 1 char(0x20,0x09,0x0a,0x0d,0x20) + 7.7 0 char(0x20,0x09,0x0a,0x0c,0x0d,0x20) +} { + do_execsql_test json-$tn.1 \ + "SELECT json_valid(printf('%s{%s\"x\"%s:%s9%s}%s', + $::ws,$::ws,$::ws,$::ws,$::ws,$::ws));" \ + $isvalid +} finish_test |