+ fclose(fp);
+ fp = open_unicode_test("auxiliary/GraphemeBreakTest.txt");
+ lineno = 0;
+ while(!inputline("GraphemeBreakTest.txt.txt", fp, &l, '\n')) {
+ ++lineno;
+ if(l[0] == '#') continue;
+ bn = 0;
+ lp = l;
+ while(*lp) {
+ if(*lp == ' ' || *lp == '\t') {
+ ++lp;
+ continue;
+ }
+ if(*lp == '#')
+ break;
+ if((unsigned char)*lp == 0xC3 && (unsigned char)lp[1] == 0xB7) {
+ /* 00F7 DIVISION SIGN */
+ break_allowed[bn] = 1;
+ lp += 2;
+ continue;
+ }
+ if((unsigned char)*lp == 0xC3 && (unsigned char)lp[1] == 0x97) {
+ /* 00D7 MULTIPLICATION SIGN */
+ break_allowed[bn] = 0;
+ lp += 2;
+ continue;
+ }
+ if(isxdigit((unsigned char)*lp)) {
+ buffer[bn++] = strtoul(lp, &lp, 16);
+ continue;
+ }
+ fatal(0, "GraphemeBreakTest.txt:%d: evil line: %s", lineno, l);
+ }
+ for(cn = 0; cn <= bn; ++cn) {
+ if(utf32_is_gcb(buffer, bn, cn) != break_allowed[cn]) {
+ fprintf(stderr,
+ "GraphemeBreakTest.txt:%d: offset %d: utf32_is_gcb wrong\n",
+ lineno, cn);
+ ++errors;
+ }
+ ++tests;
+ }
+ xfree(l);
+ }