diff options
-rw-r--r-- | test/oldfminit.c | 8 | ||||
-rw-r--r-- | test/olducsinit.c | 8 | ||||
-rw-r--r-- | test/ucsinit.c | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test/oldfminit.c b/test/oldfminit.c index 4350949..99726c1 100644 --- a/test/oldfminit.c +++ b/test/oldfminit.c @@ -305,6 +305,14 @@ int main(int argc, const char **argv) assert(3 == offset); assert(50 == x); + /* Compute width of replacement character */ + assert(rufl_OK == rufl_width("Corpus", rufl_WEIGHT_500, 160, + (const uint8_t *) "\xef\xbf\xbd", 3, &width)); + assert(17 == width); + assert(rufl_OK == rufl_width("Corpus", rufl_WEIGHT_500, 160, + (const uint8_t *) "\xf0\xa0\x80\xa5", 4, &width)); + assert(26 == width); + rufl_dump_state(true); rufl_quit(); diff --git a/test/olducsinit.c b/test/olducsinit.c index aa2d874..813c541 100644 --- a/test/olducsinit.c +++ b/test/olducsinit.c @@ -92,6 +92,14 @@ int main(int argc, const char **argv) assert(3 == offset); assert(50 == x); + /* Compute width of replacement character */ + assert(rufl_OK == rufl_width("Corpus", rufl_WEIGHT_500, 160, + (const uint8_t *) "\xef\xbf\xbd", 3, &width)); + assert(17 == width); + assert(rufl_OK == rufl_width("Corpus", rufl_WEIGHT_500, 160, + (const uint8_t *) "\xf0\xa0\x80\xa5", 4, &width)); + assert(26 == width); + rufl_dump_state(true); rufl_quit(); diff --git a/test/ucsinit.c b/test/ucsinit.c index c0fc06f..0308b54 100644 --- a/test/ucsinit.c +++ b/test/ucsinit.c @@ -92,6 +92,14 @@ int main(int argc, const char **argv) assert(3 == offset); assert(50 == x); + /* Compute width of replacement character */ + assert(rufl_OK == rufl_width("Corpus", rufl_WEIGHT_500, 160, + (const uint8_t *) "\xef\xbf\xbd", 3, &width)); + assert(17 == width); + assert(rufl_OK == rufl_width("Corpus", rufl_WEIGHT_500, 160, + (const uint8_t *) "\xf0\xa0\x80\xa5", 4, &width)); + assert(26 == width); + rufl_dump_state(true); rufl_quit(); |