You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/libutf8proc/files/libutf8proc-grapheme-test.p...

24 lines
882 B

https://github.com/JuliaStrings/utf8proc/commit/11bb3d9dc796bb006c79c2962a7d19abcadfb3df
Author: Steven G. Johnson <stevenj@alum.mit.edu>
--- a/test/graphemetest.c
+++ b/test/graphemetest.c
@@ -18,12 +18,12 @@ int main(int argc, char **argv)
while (buf[bi]) {
bi = skipspaces(buf, bi);
- if (buf[bi] == '/') { /* grapheme break */
+ if ((uint8_t)buf[bi] == 0xc3 && (uint8_t)buf[bi+1] == 0xb7) { /* U+00f7 = grapheme break */
src[si++] = '/';
- bi++;
+ bi += 2;
}
- else if (buf[bi] == '+') { /* no break */
- bi++;
+ else if ((uint8_t)buf[bi] == 0xc3 && (uint8_t)buf[bi+1] == 0x97) { /* U+00d7 = no break */
+ bi += 2;
}
else if (buf[bi] == '#') { /* start of comments */
break;