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:
parent
1eb0ae0a3a
commit
a447f0d628
1 changed files with 14 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue