summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_gettext.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_gettext.vim')
-rw-r--r--src/testdir/test_gettext.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_gettext.vim b/src/testdir/test_gettext.vim
new file mode 100644
index 0000000..a990121
--- /dev/null
+++ b/src/testdir/test_gettext.vim
@@ -0,0 +1,18 @@
+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