Skip to content

Commit e456787

Browse files
cosmo0920edsiper
authored andcommitted
utils: test: Add the write_str breaking case for enabling SIMD
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 2c01207 commit e456787

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/internal/utils.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,14 @@ void test_write_str_special_bytes()
369369
"\\u4f60\\u597d\\u4e16\\u754c",
370370
FLB_TRUE
371371
},
372+
/*
373+
* Escaped leading hex (two hex, one valid unicode)
374+
*/
375+
{
376+
"你好我来自一个汉字文化影响的地方", 48,
377+
"\\u4f60\\u597d\\u6211\\u6765\\u81ea\\u4e00\\u4e2a\\u6c49\\u5b57\\u6587\\u5316\\u5f71\\u54cd\\u7684\\u5730\\u65b9",
378+
FLB_TRUE
379+
},
372380
{
373381
"\xC3\xA1\x0A", 3, /* UTF-8 encoding of á and newline */
374382
"\\u00e1\\n", /* Expected escaped output */

0 commit comments

Comments
 (0)