1
0
forked from aniani/vim
Files
vim/src/testdir/test_gettext.vim
Christ van Willegen 8252ef134f patch 9.1.0560: bindtextdomain() does not indicate an error
Problem:  bindtextdomain() does not indicate an error
          (after v9.1.509)
Solution: return false on failure (OOM).
          (Chris van Willegen)

closes: #15116

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 21:36:21 +02:00

19 lines
563 B
VimL

source check.vim
CheckFeature gettext
" Test for gettext()
func Test_gettext()
call assert_fails('call bindtextdomain("test")', 'E119:')
call assert_fails('call bindtextdomain("vim", "test")', 'E475:')
call assert_fails('call gettext(1)', 'E1174:')
call assert_equal('xxxTESTxxx', gettext("xxxTESTxxx"))
call assert_equal('xxxTESTxxx', gettext("xxxTESTxxx", "vim"))
call assert_equal('xxxTESTxxx', gettext("xxxTESTxxx", "__PACKAGE__"))
call assert_equal('ERROR: ', gettext("ERROR: ", "__PACKAGE__"))
endfunc
" vim: shiftwidth=2 sts=2 expandtab