diff options
author | Aarni Koskela <akx@iki.fi> | 2022-01-25 15:14:22 +0200 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2022-01-27 15:23:23 +0200 |
commit | 8bbaa65826843391f97605bbde5c0f0a6105fd1e (patch) | |
tree | ac3cfc45d45c94b6efc923e1740ede200b0eb3ad /tests | |
parent | 5279170b51de43a48d3a2505eb12399c81112d8a (diff) | |
download | babel-8bbaa65826843391f97605bbde5c0f0a6105fd1e.tar.gz |
parse_locale(): upper-case variant tag to match file system
At all times, language tags and their subtags, including private use
and extensions, are to be treated as case insensitive: there exist
conventions for the capitalization of some of the subtags, but these
MUST NOT be taken to carry meaning.
Fixes #814
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_core.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 2aa8403..53578f8 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -325,3 +325,9 @@ def test_issue_601_no_language_name_but_has_variant(): # part of a language name. assert Locale.parse('fi_FI').get_display_name('kw_GB') == None + + +def test_issue_814(): + loc = Locale.parse('ca_ES_valencia') + assert loc.variant == "VALENCIA" + assert loc.get_display_name() == 'català (Espanya, valencià)' |