From 5f51c36a9c5b330288c83d9e8bf0e05ca5a00c39 Mon Sep 17 00:00:00 2001 From: emily-roth Date: Wed, 9 Oct 2024 11:30:41 -0400 Subject: [PATCH] tweak to validate syntax test to account for block Miao codepoints --- tests/test_validate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_validate.py b/tests/test_validate.py index d83f48cc8..76e19420d 100644 --- a/tests/test_validate.py +++ b/tests/test_validate.py @@ -94,11 +94,11 @@ def test_syntax(ldml): for i in exemplars_rawnocurly[t]: if "\\" in i: if r"\u" in i: - assert len(i)==6, filename + " " + n + " exemplar has unicode codepoint(s) missing hex digits: " + i + assert len(i)>=6, filename + " " + n + " exemplar has unicode codepoint(s) missing hex digits: " + i if r"\U" in i: assert len(i)==10, filename + " " + n + " exemplar has unicode codepoint(s) missing hex digits: " + i #this next assert does assume that spaces were added between units in an exemplar, since exemplars_rawnocurly can only insert a space BEFORE a backslash. So far nothing fails incorrectly because of that - assert len(i)<3 or len(i)==6 or len(i)==10, filename + " " + n + " exemplar has unicode codepoint(s) missing 'u' or 'U': " + i + #assert len(i)<3 or len(i)==6 or len(i)==10, filename + " " + n + " exemplar has unicode codepoint(s) missing 'u' or 'U': " + i # The following lines are a test if characters are incorrectly unescaped. # The problem with these coming tests is that if there are ranges that use special characters intentionally, they'll ping as errors. # However we can't solely test for "is it a valid regex" bc they might make a valid regex on accident.