From f27201e10129a5264a012b840bcea9ccbe7a4457 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Thu, 5 Dec 2024 17:50:42 -0600 Subject: [PATCH] tests: internal: utils: add missing test Signed-off-by: Eduardo Silva --- tests/internal/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/internal/utils.c b/tests/internal/utils.c index fb9f8c1f2a1..6195c0e848e 100644 --- a/tests/internal/utils.c +++ b/tests/internal/utils.c @@ -278,7 +278,6 @@ void test_write_str_invalid_leading_byte() void test_write_str_special_bytes() { - struct write_str_case cases[] = { /* * Escaped leading hex (two hex, one valid unicode) @@ -288,6 +287,11 @@ void test_write_str_special_bytes() "\\u4f60\\u597d\\u4e16\\u754c", FLB_TRUE }, + { + "\xC3\xA1\x0A", 3, /* UTF-8 encoding of รก and newline */ + "\\u00e1\\n", /* Expected escaped output */ + FLB_TRUE + }, { 0 } };