diff --git a/tests/basic/test.py b/tests/basic/test.py new file mode 100644 index 0000000..71f1b38 --- /dev/null +++ b/tests/basic/test.py @@ -0,0 +1,12 @@ +#! /usr/bin/python3 + +import gi +gi.require_version('LangTag', '0.6') +from gi.repository import LangTag + +tag = LangTag.Tag.new() +if not tag.parse("en-Latn-US"): + exit(1) + +if tag.canonicalize() != 'en-US': + exit(1) diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..2980de6 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + become: yes + tags: + - classic + roles: + - role: standard-test-basic + required_packages: + - liblangtag-gobject + - python3 + tests: + - basic: + run: python3 ./test.py