diff --git a/test/lsp/ui/vim/completion.vimspec b/test/lsp/ui/vim/completion.vimspec new file mode 100644 index 000000000..e1a516ffe --- /dev/null +++ b/test/lsp/ui/vim/completion.vimspec @@ -0,0 +1,37 @@ +Describe lsp#uivim#completion + + Before each + %delete _ + setlocal filetype=html + setlocal omnifunc=lsp#omni#complete + End + + It should expand simple snippet with multibyte chars + Skip This test needs asynchronous process and snippetSupport=true + + call setline(1, ['
']) + execute "normal! 'gg$ha id\\\\'" + + " wait for feedkeys. + + Assert Equals(getline(1), '
') + Assert Equals(getpos('.')[1 : 2], [1, 30]) + End + + It should expand when textEdit.start.character is less than completion start col + Skip This test needs asynchronous process and snippetSupport=true + + call setline(1, [ + \ '', + \ '
', + \ ' ', + \ '']) + execute "normal! ':gg2j$ha\\\\'" + + " wait for feedkeys. + + Assert Equals(getline(3), '
') + Assert Equals(getpos('.')[1 : 2], [1, 8]) + End + +End