Changeset 14677


Ignore:
Timestamp:
Feb 6, 2016, 10:23:36 PM (7 years ago)
Author:
mikedld
Message:

#6064: Add test cases which exhibit the issue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils-test.c

    r14639 r14677  
    129129  check (tr_utf8_validate (out, TR_BAD_SIZE, NULL));
    130130  check_streq (in, out);
     131  tr_free (out);
     132
     133  in = "\xF4\x00\x81\x82";
     134  out = tr_utf8clean (in, 4);
     135  check (out != NULL);
     136  check_streq ("?", out);
     137  check (tr_utf8_validate (out, TR_BAD_SIZE, NULL));
     138  tr_free (out);
     139
     140  in = "\xF4\x33\x81\x82";
     141  out = tr_utf8clean (in, 4);
     142  check (out != NULL);
     143  check_streq ("?3??", out);
     144  check (tr_utf8_validate (out, TR_BAD_SIZE, NULL));
    131145  tr_free (out);
    132146
Note: See TracChangeset for help on using the changeset viewer.