From e7757d5f488e353a7f3ed8da1f4ffee825bf55c2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 29 Sep 2021 16:43:41 +0900 Subject: [PATCH] Add CI test Resolves: rhbz#2008783 --- tests/basic/test.py | 12 ++++++++++++ tests/tests.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/basic/test.py create mode 100644 tests/tests.yml 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