From 8aba382729f6a2eb5d87fa2aef3f839cdc32099f 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 80389e6b208..1222258f8c7 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 } };