File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ static void test_sds_printf_7143_off_by_1()
4444 flb_sds_t test ;
4545 flb_sds_t test2 ;
4646 int len ;
47-
47+
4848 /* 66 char final string, not impacted by bug */
4949 test = flb_sds_create_size (64 );
5050 TEST_CHECK (test != NULL );
@@ -69,13 +69,20 @@ static void test_sds_printf_7143_off_by_1()
6969
7070static void test_sds_cat_utf8 ()
7171{
72+ int ret ;
7273 flb_sds_t s ;
7374 char * utf8_str = "\xe8\x9f\xb9\xf0\x9f\xa6\x80" ;
75+ char * expected = "\\u87f9\\ud83e\\udd80" ;
7476
7577 s = flb_sds_create ("" );
7678 flb_sds_cat_utf8 (& s , utf8_str , strlen (utf8_str ));
7779
78- TEST_CHECK (strcmp (s , "\\u87f9\\u1f980" ) == 0 );
80+ ret = strcmp (s , expected );
81+ TEST_CHECK (ret == 0 );
82+ if (ret != 0 ) {
83+ printf ("Expected: %s\n" , expected );
84+ printf ("Received: %s\n" , s );
85+ }
7986 flb_sds_destroy (s );
8087}
8188
You can’t perform that action at this time.
0 commit comments