From 7d91cc9fa7c583efe91619359db7f6fea210e55d Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Fri, 28 Jul 2023 14:33:05 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- tests/parse/test.py | 15 +++++++++++++++ tests/tests.yml | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/parse/test.py create mode 100644 tests/tests.yml diff --git a/tests/parse/test.py b/tests/parse/test.py new file mode 100644 index 0000000..e0e5c96 --- /dev/null +++ b/tests/parse/test.py @@ -0,0 +1,15 @@ +#!/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) +assert(codepoints > 32000) diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ba2b514 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + tags: + - classic + roles: + - role: standard-test-basic + required_packages: + - unicode-ucd + - python36 + tests: + - parse: + run: python3 test.py +...