diff options
Diffstat (limited to 'test/functional/viml')
-rw-r--r-- | test/functional/viml/completion_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/viml/errorlist_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/viml/function_spec.lua | 11 | ||||
-rw-r--r-- | test/functional/viml/lang_spec.lua | 22 |
4 files changed, 34 insertions, 3 deletions
diff --git a/test/functional/viml/completion_spec.lua b/test/functional/viml/completion_spec.lua index 2b3844bf6d..33f481bae2 100644 --- a/test/functional/viml/completion_spec.lua +++ b/test/functional/viml/completion_spec.lua @@ -1,4 +1,4 @@ -local helpers = require('test.functional.helpers') +local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local clear, feed = helpers.clear, helpers.feed local eval, eq, neq = helpers.eval, helpers.eq, helpers.neq diff --git a/test/functional/viml/errorlist_spec.lua b/test/functional/viml/errorlist_spec.lua index 30cb86f8d1..56d08771b7 100644 --- a/test/functional/viml/errorlist_spec.lua +++ b/test/functional/viml/errorlist_spec.lua @@ -1,4 +1,4 @@ -local helpers = require('test.functional.helpers') +local helpers = require('test.functional.helpers')(after_each) local clear = helpers.clear local command = helpers.command diff --git a/test/functional/viml/function_spec.lua b/test/functional/viml/function_spec.lua index 665f5d4467..f0a4406593 100644 --- a/test/functional/viml/function_spec.lua +++ b/test/functional/viml/function_spec.lua @@ -1,7 +1,8 @@ -local helpers = require('test.functional.helpers') +local helpers = require('test.functional.helpers')(after_each) local clear = helpers.clear local eq = helpers.eq +local eval = helpers.eval local exc_exec = helpers.exc_exec describe('Up to MAX_FUNC_ARGS arguments are handled by', function() @@ -27,3 +28,11 @@ describe('Up to MAX_FUNC_ARGS arguments are handled by', function() eq('Vim(call):E740: Too many arguments for function rpcnotify', ret) end) end) + +describe('api_info()', function() + before_each(clear) + it('has the right keys', function() + local api_keys = eval("sort(keys(api_info()))") + eq({'error_types', 'functions', 'types'}, api_keys) + end) +end) diff --git a/test/functional/viml/lang_spec.lua b/test/functional/viml/lang_spec.lua new file mode 100644 index 0000000000..a27e18f695 --- /dev/null +++ b/test/functional/viml/lang_spec.lua @@ -0,0 +1,22 @@ +local helpers = require('test.functional.helpers')(after_each) +local clear, eval, eq = helpers.clear, helpers.eval, helpers.eq +local execute, source = helpers.execute, helpers.source + +describe('viml', function() + before_each(clear) + + it('parses `<SID>` with turkish locale', function() + execute('lang ctype tr_TR.UTF-8') + if string.find(eval('v:errmsg'), '^E197: ') then + pending("Locale tr_TR.UTF-8 not supported") + return + end + source([[ + func! <sid>_dummy_function() + echo 1 + endfunc + au VimEnter * call <sid>_dummy_function() + ]]) + eq(nil, string.find(eval('v:errmsg'), '^E129')) + end) +end) |