diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-29 23:15:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-29 23:15:07 +0200 |
commit | c60e409471c51864883bd0b874980d0a8857f813 (patch) | |
tree | 64444c3f0210461e398654e3d6dd6f00e0091cd9 /test/functional/viml/completion_spec.lua | |
parent | c35420558bed0bfa9938ecd1facec88f1df392a5 (diff) | |
parent | 46efe14473fa803f84509592cc1e8fca4eb20640 (diff) | |
download | rneovim-c60e409471c51864883bd0b874980d0a8857f813.tar.gz rneovim-c60e409471c51864883bd0b874980d0a8857f813.tar.bz2 rneovim-c60e409471c51864883bd0b874980d0a8857f813.zip |
Merge #5119 from ZyX-I/split-eval
Diffstat (limited to 'test/functional/viml/completion_spec.lua')
-rw-r--r-- | test/functional/viml/completion_spec.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/functional/viml/completion_spec.lua b/test/functional/viml/completion_spec.lua index cd5f4260e0..3c09d71eb7 100644 --- a/test/functional/viml/completion_spec.lua +++ b/test/functional/viml/completion_spec.lua @@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen') local clear, feed = helpers.clear, helpers.feed local eval, eq, neq = helpers.eval, helpers.eq, helpers.neq local execute, source, expect = helpers.execute, helpers.source, helpers.expect +local meths = helpers.meths if helpers.pending_win32(pending) then return end @@ -814,6 +815,41 @@ describe('completion', function() end) end) + describe('with numeric items', function() + before_each(function() + source([[ + function! TestComplete() abort + call complete(1, g:_complist) + return '' + endfunction + ]]) + meths.set_option('completeopt', 'menuone,noselect') + meths.set_var('_complist', {{ + word=0, + abbr=1, + menu=2, + kind=3, + info=4, + icase=5, + dup=6, + empty=7, + }}) + end) + + it('shows correct variant as word', function() + feed('i<C-r>=TestComplete()<CR>') + screen:expect([[ + ^ | + {1:1 3 2 }{0: }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {3:-- INSERT --} | + ]]) + end) + end) end) describe('External completion popupmenu', function() |