summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2024-03-10 13:15:55 +0100
committerTomas Mraz <tomas@openssl.org>2024-03-15 17:21:35 +0100
commitbc3eb7b52789bdea457e4fdff6e25da340c88901 (patch)
treeb2db680b20661bd7f454f1e03ed10481b2a1e2ab /test
parent707b54bee2abbfe94a80361ab97cf77e1e4746bb (diff)
Try to fix intermittent CI failures in quic_multistream test
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23807)
Diffstat (limited to 'test')
-rw-r--r--test/json_test.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/json_test.c b/test/json_test.c
index 5a054b7c6d..db3038d766 100644
--- a/test/json_test.c
+++ b/test/json_test.c
@@ -427,8 +427,23 @@ END_SCRIPT_EXPECTING_S("{\"x\":")
BEGIN_SCRIPT(err_utf8, "error test: only basic ASCII supported", 0)
OPJ_STR("\x80")
- OP_ASSERT_ERROR(1)
-END_SCRIPT_EXPECTING_S("\"")
+ OP_ASSERT_ERROR(0)
+END_SCRIPT_EXPECTING_S("\"\\u0080\"")
+
+BEGIN_SCRIPT(utf8_2, "test: valid UTF-8 2byte supported", 0)
+ OPJ_STR("low=\xc2\x80, high=\xdf\xbf")
+ OP_ASSERT_ERROR(0)
+END_SCRIPT_EXPECTING_S("\"low=\xc2\x80, high=\xdf\xbf\"")
+
+BEGIN_SCRIPT(utf8_3, "test: valid UTF-8 3byte supported", 0)
+ OPJ_STR("low=\xe0\xa0\x80, high=\xef\xbf\xbf")
+ OP_ASSERT_ERROR(0)
+END_SCRIPT_EXPECTING_S("\"low=\xe0\xa0\x80, high=\xef\xbf\xbf\"")
+
+BEGIN_SCRIPT(utf8_4, "test: valid UTF-8 4byte supported", 0)
+ OPJ_STR("low=\xf0\x90\xbf\xbf, high=\xf4\x8f\xbf\xbf")
+ OP_ASSERT_ERROR(0)
+END_SCRIPT_EXPECTING_S("\"low=\xf0\x90\xbf\xbf, high=\xf4\x8f\xbf\xbf\"")
BEGIN_SCRIPT(ijson_int, "I-JSON: large integer", OSSL_JSON_FLAG_IJSON)
OPJ_BEGIN_A()
@@ -508,6 +523,9 @@ static const info_func scripts[] = {
SCRIPT(err_obj_multi_key)
SCRIPT(err_obj_no_value)
SCRIPT(err_utf8)
+ SCRIPT(utf8_2)
+ SCRIPT(utf8_3)
+ SCRIPT(utf8_4)
SCRIPT(ijson_int)
SCRIPT(multi_item)
SCRIPT(seq)