From cb459c79aad90a53ef74fe702848dc9f8538eecd Mon Sep 17 00:00:00 2001 From: Vitaly Baranov Date: Thu, 16 May 2019 20:43:01 +0300 Subject: [PATCH] Add a test case with incorrect JSON. --- dbms/tests/queries/0_stateless/00918_json_functions.reference | 1 + dbms/tests/queries/0_stateless/00918_json_functions.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/dbms/tests/queries/0_stateless/00918_json_functions.reference b/dbms/tests/queries/0_stateless/00918_json_functions.reference index 1774ac7b5bd..e98579a1aba 100644 --- a/dbms/tests/queries/0_stateless/00918_json_functions.reference +++ b/dbms/tests/queries/0_stateless/00918_json_functions.reference @@ -19,6 +19,7 @@ Array 200 300 1 +0 --JSONExtractString-- hello hello diff --git a/dbms/tests/queries/0_stateless/00918_json_functions.sql b/dbms/tests/queries/0_stateless/00918_json_functions.sql index fb028d08803..3bf0090a862 100644 --- a/dbms/tests/queries/0_stateless/00918_json_functions.sql +++ b/dbms/tests/queries/0_stateless/00918_json_functions.sql @@ -23,6 +23,7 @@ SELECT JSONExtractInt('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', 1); SELECT JSONExtractFloat('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', 2); SELECT JSONExtractUInt('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', -1); SELECT JSONExtractBool('{"passed": true}', 'passed'); +SELECT JSONExtractBool('"HX-='); SELECT '--JSONExtractString--'; SELECT JSONExtractString('{"a": "hello", "b": [-100, 200.0, 300]}', 'a');