diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-08 01:54:58 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-08 01:54:58 +0300 |
commit | 043d8ff9f2389f8deab7934aa0ab4ce88a747f01 (patch) | |
tree | 4d6fa32d7c1ddaa99c15f80c1a4ba95d5f3ca2da /test/functional/viml/completion_spec.lua | |
parent | 5992cdf3c27ee9c73cea22e288c6ea6d54867394 (diff) | |
parent | 13352c00f1909d9296c5f276a3735f5e6f231b39 (diff) | |
download | rneovim-043d8ff9f2389f8deab7934aa0ab4ce88a747f01.tar.gz rneovim-043d8ff9f2389f8deab7934aa0ab4ce88a747f01.tar.bz2 rneovim-043d8ff9f2389f8deab7934aa0ab4ce88a747f01.zip |
Merge branch 'master' into luaviml'/lua
Diffstat (limited to 'test/functional/viml/completion_spec.lua')
-rw-r--r-- | test/functional/viml/completion_spec.lua | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/functional/viml/completion_spec.lua b/test/functional/viml/completion_spec.lua index cd5f4260e0..5a37cb8f43 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,57 @@ 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) + + it("'ignorecase' 'infercase' CTRL-X CTRL-N #6451", function() + execute('set ignorecase infercase') + execute('edit BACKERS.md') + feed('oX<C-X><C-N>') + screen:expect([[ + # Bountysource Backers | + Xnull^ | + {2:Xnull }{6: } | + {1:Xoxomoon }{6: }ryone who backed our [Bountysource fundraise| + {1:Xu }{6: }ountysource.com/teams/neovim/fundraiser)! | + {1:Xpayn }{2: } | + {1:Xinity }{2: }d URL in BACKERS.md. | + {3:-- Keyword Local completion (^N^P) }{4:match 1 of 7} | + ]]) + end) end) describe('External completion popupmenu', function() |