Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndris Mednis <Andris.Mednis@zabbix.com>2018-04-26 19:59:00 +0300
committerAndris Mednis <Andris.Mednis@zabbix.com>2018-04-26 19:59:00 +0300
commit1fbc86b9617e40bf2949af4d43765f3b92480e23 (patch)
treedf5efb6236f43150a693b0bccb33c0c30033dcc2 /tests/libs/zbxjson
parent2caf23020d655bb3680a41d38aa24d71a1da1567 (diff)
.......... [ZBX-13782] added some unit tests for conversion of escaped JSON Unicode characters to UTF-8
Diffstat (limited to 'tests/libs/zbxjson')
-rw-r--r--tests/libs/zbxjson/zbx_json_path_open.yaml64
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/libs/zbxjson/zbx_json_path_open.yaml b/tests/libs/zbxjson/zbx_json_path_open.yaml
index f0271d433d6..f6630672eed 100644
--- a/tests/libs/zbxjson/zbx_json_path_open.yaml
+++ b/tests/libs/zbxjson/zbx_json_path_open.yaml
@@ -121,4 +121,68 @@ in:
out:
result: succeed
value: 3
+---
+test case: ZBX-13782, escaped Unicode character which translates into 1 byte UTF-8
+in:
+ json: '{"DeviceLog": "IPv6-Pr\u00e4fix"}'
+ path: $.DeviceLog
+out:
+ result: succeed
+ value: "IPv6-Präfix"
+---
+test case: ZBX-13782, escaped Unicode character which translates into 2 byte UTF-8
+in:
+ json: '{"DeviceLog": "IPv6-Pr\u00D1fix"}'
+ path: $.DeviceLog
+out:
+ result: succeed
+ value: "IPv6-PrÑfix"
+---
+test case: ZBX-13782, escaped Unicode character which translates into 2 byte UTF-8
+in:
+ json: '{"DeviceLog": "IPv6-Pr\u042Ffix"}'
+ path: $.DeviceLog
+out:
+ result: succeed
+ value: "IPv6-PrЯfix"
+---
+test case: ZBX-13782, escaped Unicode character which translates into 3 byte UTF-8
+in:
+ json: '{"DeviceLog": "IPv6-Pr\u0800fix"}'
+ path: $.DeviceLog
+out:
+ result: succeed
+ value: "IPv6-Prࠀfix"
+---
+test case: ZBX-13782, escaped Unicode character which translates into 3 byte UTF-8
+in:
+ json: '{"DeviceLog": "IPv6-Pr\u10c0fix"}'
+ path: $.DeviceLog
+out:
+ result: succeed
+ value: "IPv6-PrჀfix"
+---
+test case: ZBX-13782, escaped Unicode character which translates into 3 byte UTF-8
+in:
+ json: '{"DeviceLog": "IPv6-Pr\u10c0fix"}'
+ path: $.DeviceLog
+out:
+ result: succeed
+ value: "IPv6-PrჀfix"
+---
+test case: ZBX-13782, single escaped Unicode character which translates into 3 byte UTF-8
+in:
+ json: '{"DeviceLog": "\u20E0"}'
+ path: $.DeviceLog
+out:
+ result: succeed
+ value: "⃠"
+---
+test case: ZBX-13782, escaped Unicode character which translates into 3 byte UTF-8
+in:
+ json: '{"DeviceLog": "-\u20E0-"}'
+ path: $.DeviceLog
+out:
+ result: succeed
+ value: "-⃠-"
...