diff options
author | Matias Linares <matiaslina@gmail.com> | 2018-12-17 07:30:05 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2018-12-17 07:30:05 -0300 |
commit | d0f75b9b35806b64e42158708c58808a7a42928b (patch) | |
tree | 23e87238e8d10208fe9d4d8e46afe9b75aec5338 /t/01-basic.t | |
download | perl6-gettext-master.tar.gz |
Diffstat (limited to 't/01-basic.t')
-rw-r--r-- | t/01-basic.t | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/01-basic.t b/t/01-basic.t new file mode 100644 index 0000000..9fada2f --- /dev/null +++ b/t/01-basic.t @@ -0,0 +1,18 @@ +use v6.c; +use Test; +use Gettext; + +constant spanish = 'es_ES.utf8'; +constant english = 'en_US.utf8'; +constant text-domain = 'test'; + +ok bindtextdomain(text-domain, 't/langs/'); +ok textdomain(text-domain); + +setlocale(Gettext::LocaleCategory::LcAll, spanish); +is _('Hello, world!'), 'Hola, mundo!'; + +setlocale(Gettext::LocaleCategory::LcAll, english); +is _('Hello, world!'), 'Hello, world!'; + +done-testing; |