]> git.madduck.net Git - etc/vim.git/blobdiff - .vim/bundle/vim-lsp/test/lsp/ui/vim/completion.vimspec

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit 'a39f715c13be3352193ffd9c5b7536b8786eff64' as '.vim/bundle/vim-lsp'
[etc/vim.git] / .vim / bundle / vim-lsp / test / lsp / ui / vim / completion.vimspec
diff --git a/.vim/bundle/vim-lsp/test/lsp/ui/vim/completion.vimspec b/.vim/bundle/vim-lsp/test/lsp/ui/vim/completion.vimspec
new file mode 100644 (file)
index 0000000..5f9b2c4
--- /dev/null
@@ -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, ['<div class="あいうえお">'])
+        execute "normal! 'gg$ha id\<C-x>\<C-o>\<C-n>\<Tab>'"
+
+        " wait for feedkeys.
+
+        Assert Equals(getline(1), '<div class="あいうえお" id="">')
+        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, [
+              \ '<html>',
+              \ '  <div>',
+              \ '    </>',
+              \ '</html>'])
+        execute "normal! ':gg2j$ha\<C-x>\<C-o>\<C-n>\<Tab>'"
+
+        " wait for feedkeys.
+
+        Assert Equals(getline(3), '  </div>')
+        Assert Equals(getpos('.')[1 : 2], [1, 8])
+    End
+
+End