test: update to unicode 17 and assume ascii text
This commit is contained in:
parent
d9ff1bc8d1
commit
96a40fa57a
1 changed files with 3 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ codepoints = 0
|
|||
|
||||
file = '/usr/share/unicode/ucd/UnicodeData.txt'
|
||||
|
||||
with open(file, mode='rt', encoding='utf-8') as unicode_data:
|
||||
with open(file, mode='rt', encoding='ascii') as unicode_data:
|
||||
for line in unicode_data.readlines():
|
||||
codepoint_string, name, category = line.split(';')[:3]
|
||||
codepoint = int(codepoint_string, 16)
|
||||
|
|
@ -12,5 +12,5 @@ with open(file, mode='rt', encoding='utf-8') as unicode_data:
|
|||
codepoints = codepoints + 1
|
||||
|
||||
print(codepoints)
|
||||
# Unicode 16 has 40116
|
||||
assert(codepoints > 40000)
|
||||
# Unicode 17
|
||||
assert(codepoints == 40575)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue