Fix is_combining_mark table data

* In `scripts/unicode.py`, the data used to generate `is_combining_mark()`
was being passed to the emit function incorrectly, resulting in the
table containing some other data instead. The script is fixed and new
`tables.rs` is generated.

* Add test for `is_combining_mark()` for ASCII chars, as well as a
couple of random chars based on the reported issue.

Fix https://github.com/unicode-rs/unicode-normalization/issues/16
This commit is contained in:
Behnam Esfahbod
2017-06-01 14:38:37 -06:00
parent 3898e77b11
commit 1e74c347b6
3 changed files with 212 additions and 270 deletions
+1 -1
View File
@@ -350,7 +350,7 @@ pub struct Slice {
""")
emit_table(f, "general_category_mark", combine, "&'static [(char, char)]", is_pub=False,
emit_table(f, "general_category_mark", general_category_mark, "&'static [(char, char)]", is_pub=False,
pfun=lambda x: "(%s,%s)" % (escape_char(x[0]), escape_char(x[1])))
f.write("""