blob: 277710e14d5555494a561312eb72df27abe540bb [file] [log] [blame]
Christ van Willegence0ef912024-06-20 23:41:59 +02001source check.vim
2
3" Test for gettext()
4func Test_gettext()
5 set encoding=utf-8
6 call bindtextdomain("__PACKAGE__", getcwd())
7 try
8 language ru_RU
9 call assert_equal('ОШИБКА: ', gettext("ERROR: ", "__PACKAGE__"))
10 catch /^Vim\%((\a\+)\)\=:E197:/
11 throw "Skipped: not possible to set locale to ru (missing?)"
12 endtry
13 try
14 language en_GB.UTF-8
15 call assert_equal('ERROR: ', gettext("ERROR: ", "__PACKAGE__"))
16 catch /^Vim\%((\a\+)\)\=:E197:/
17 throw "Skipped: not possible to set locale to en (missing?)"
18 endtry
19 set encoding&
20endfunc
21
22" vim: shiftwidth=2 sts=2 expandtab