You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
liblangtag/tests/basic/test.py

13 lines
218 B

#! /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)