Skip to content

Commit 8aba382

Browse files
committed
tests: internal: utils: add missing test
Signed-off-by: Eduardo Silva <[email protected]>
1 parent b030346 commit 8aba382

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/internal/utils.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ void test_write_str_invalid_leading_byte()
278278

279279
void test_write_str_special_bytes()
280280
{
281-
282281
struct write_str_case cases[] = {
283282
/*
284283
* Escaped leading hex (two hex, one valid unicode)
@@ -288,6 +287,11 @@ void test_write_str_special_bytes()
288287
"\\u4f60\\u597d\\u4e16\\u754c",
289288
FLB_TRUE
290289
},
290+
{
291+
"\xC3\xA1\x0A", 3, /* UTF-8 encoding of á and newline */
292+
"\\u00e1\\n", /* Expected escaped output */
293+
FLB_TRUE
294+
},
291295
{ 0 }
292296
};
293297

0 commit comments

Comments
 (0)