add simple CI test
This commit is contained in:
parent
cc9528ecb7
commit
f0778bc3f3
16
tests/parse/test.py
Normal file
16
tests/parse/test.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
codepoints = 0
|
||||||
|
|
||||||
|
file = '/usr/share/unicode/ucd/UnicodeData.txt'
|
||||||
|
|
||||||
|
with open(file, mode='rt', encoding='utf-8') as unicode_data:
|
||||||
|
for line in unicode_data.readlines():
|
||||||
|
codepoint_string, name, category = line.split(';')[:3]
|
||||||
|
codepoint = int(codepoint_string, 16)
|
||||||
|
char = chr(codepoint)
|
||||||
|
codepoints = codepoints + 1
|
||||||
|
|
||||||
|
print(codepoints)
|
||||||
|
# Unicode 14 has 34626
|
||||||
|
assert(codepoints > 34000)
|
13
tests/tests.yml
Normal file
13
tests/tests.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
required_packages:
|
||||||
|
- unicode-ucd
|
||||||
|
- python3
|
||||||
|
tests:
|
||||||
|
- parse:
|
||||||
|
run: python3 test.py
|
||||||
|
...
|
Loading…
Reference in New Issue
Block a user