Christ van Willegen | ce0ef91 | 2024-06-20 23:41:59 +0200 | [diff] [blame] | 1 | source check.vim |
Christian Brabandt | 6bc11c0 | 2024-06-21 07:31:04 +0200 | [diff] [blame^] | 2 | " TODO: Why does this fail on MacOS 14 and Windows MSVC (Github CI)? |
| 3 | CheckNotMac |
| 4 | CheckNotMSWindows |
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 |
| 11 | language ru_RU |
| 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 |
| 17 | language en_GB.UTF-8 |
| 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 |