1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

#6064: Add test cases which exhibit the issue

This commit is contained in:
Mike Gelfand 2016-02-06 22:23:36 +00:00
parent 1eb0ae0a3a
commit a447f0d628

View file

@ -130,6 +130,20 @@ test_utf8 (void)
check_streq (in, out);
tr_free (out);
in = "\xF4\x00\x81\x82";
out = tr_utf8clean (in, 4);
check (out != NULL);
check_streq ("?", out);
check (tr_utf8_validate (out, TR_BAD_SIZE, NULL));
tr_free (out);
in = "\xF4\x33\x81\x82";
out = tr_utf8clean (in, 4);
check (out != NULL);
check_streq ("?3??", out);
check (tr_utf8_validate (out, TR_BAD_SIZE, NULL));
tr_free (out);
return 0;
}