| 4 | in order to give a hint in the documentation. The hint will need to be updated if this changes. */ |
| 5 | |
| 6 | int main(void) |
| 7 | { |
| 8 | utf8proc_int32_t dst[128]; |
| 9 | utf8proc_ssize_t maxsize = 0, expected_maxsize = 4; |
| 10 | int success; |
| 11 | |
| 12 | for (utf8proc_int32_t c = 0; c <= 0x110000; ++c) { |
| 13 | utf8proc_ssize_t sz = utf8proc_decompose_char(c, dst, 128, UTF8PROC_DECOMPOSE, NULL); |
| 14 | maxsize = sz > maxsize ? sz : maxsize; |
| 15 | } |
| 16 | |
| 17 | success = expected_maxsize == maxsize; |
| 18 | fprintf(success ? stdout : stderr, |
| 19 | "%s: maximum decomposed size = %d chars\n", |
| 20 | success ? "SUCCEEDED" : "FAILED", (int) maxsize); |
| 21 | return !success; |
| 22 | } |
nothing calls this directly
no test coverage detected