diff options
author | EuAndreh <eu@euandre.org> | 2025-05-15 06:36:34 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-05-15 07:39:46 -0300 |
commit | 46375146d5c04f534d67d93dfa28157a246302cc (patch) | |
tree | bd5119ab44c5efafeb47ad51a1fd72967c618903 | |
parent | Remove "Content-Transfer-Encoding" "header" from files and strings (diff) | |
download | gotext-46375146d5c04f534d67d93dfa28157a246302cc.tar.gz gotext-46375146d5c04f534d67d93dfa28157a246302cc.tar.xz |
Use LC_MESSAGES for tests
-rw-r--r-- | tests/functional/api-usage/gotext.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/functional/api-usage/gotext.go b/tests/functional/api-usage/gotext.go index 88dcbd0..3b552db 100644 --- a/tests/functional/api-usage/gotext.go +++ b/tests/functional/api-usage/gotext.go @@ -52,8 +52,7 @@ func MainTest() { Init("tests", "locale/") testing("Español", func() { - os.Setenv("LANGUAGE", "es_MX.UTF-8") - SetLocale(LC_ALL, "") + SetLocale(LC_MESSAGES, "es_MX.UTF-8") assertEq(Gettext("Hello, world!"), "¡Hola, mundo!") assertEq(Gettext("Good morning"), "Buenos días") @@ -70,8 +69,7 @@ func MainTest() { }) testing("Deutsch", func() { - os.Setenv("LANGUAGE", "de_DE.UTF-8") - SetLocale(LC_ALL, "") + SetLocale(LC_MESSAGES, "de_DE.UTF-8") assertEq(Gettext("Hello, world!"), "Hallo, Welt!") assertEq(Gettext("Good morning"), "Guten Morgen") @@ -88,8 +86,7 @@ func MainTest() { }) testing("Français", func() { - os.Setenv("LANGUAGE", "fr_FR.UTF-8") - SetLocale(LC_ALL, "") + SetLocale(LC_MESSAGES, "fr_FR.UTF-8") assertEq(Gettext("Hello, world!"), "Hello, world!") assertEq(Gettext("Good morning"), "Good morning") |