Christ van Willegen | ce0ef91 | 2024-06-20 23:41:59 +0200 | [diff] [blame] | 1 | source check.vim |
RestorerZ | 9650910 | 2024-07-11 21:14:15 +0200 | [diff] [blame^] | 2 | " This fail on CI MacOS 14 because bindtextdomain() is not available there |
| 3 | " (missing library?) |
Christian Brabandt | 6bc11c0 | 2024-06-21 07:31:04 +0200 | [diff] [blame] | 4 | CheckNotMac |
Christ van Willegen | ce0ef91 | 2024-06-20 23:41:59 +0200 | [diff] [blame] | 5 | |
| 6 | " Test for gettext() |
| 7 | func Test_gettext() |
| 8 | set encoding=utf-8 |
| 9 | call bindtextdomain("__PACKAGE__", getcwd()) |
| 10 | try |
RestorerZ | 9650910 | 2024-07-11 21:14:15 +0200 | [diff] [blame^] | 11 | language messages ru_RU |
Christ van Willegen | ce0ef91 | 2024-06-20 23:41:59 +0200 | [diff] [blame] | 12 | call assert_equal('ОШИБКА: ', gettext("ERROR: ", "__PACKAGE__")) |
| 13 | catch /^Vim\%((\a\+)\)\=:E197:/ |
| 14 | throw "Skipped: not possible to set locale to ru (missing?)" |
| 15 | endtry |
| 16 | try |
RestorerZ | 9650910 | 2024-07-11 21:14:15 +0200 | [diff] [blame^] | 17 | language messages en_GB.UTF-8 |
Christ van Willegen | ce0ef91 | 2024-06-20 23:41:59 +0200 | [diff] [blame] | 18 | call assert_equal('ERROR: ', gettext("ERROR: ", "__PACKAGE__")) |
| 19 | catch /^Vim\%((\a\+)\)\=:E197:/ |
| 20 | throw "Skipped: not possible to set locale to en (missing?)" |
| 21 | endtry |
| 22 | set encoding& |
| 23 | endfunc |
| 24 | |
| 25 | " vim: shiftwidth=2 sts=2 expandtab |