aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/utf8_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-02-22 01:10:50 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-02-22 01:10:50 -0500
commit95230ec7022b34dafa59fc334489f490a272eace (patch)
tree07f52b0af1cb39835b04f04952b00576986459eb /test/functional/legacy/utf8_spec.lua
parent44179d7444c20d5b5bf83224fb31b67a60eb0d65 (diff)
parentc9f4f828d5d28ad2405b47ecff7994f13b8a562b (diff)
downloadrneovim-95230ec7022b34dafa59fc334489f490a272eace.tar.gz
rneovim-95230ec7022b34dafa59fc334489f490a272eace.tar.bz2
rneovim-95230ec7022b34dafa59fc334489f490a272eace.zip
Merge pull request #4267 from watiko/vim-7.4.932
vim-patch:7.4.{926,932,933}
Diffstat (limited to 'test/functional/legacy/utf8_spec.lua')
-rw-r--r--test/functional/legacy/utf8_spec.lua32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/functional/legacy/utf8_spec.lua b/test/functional/legacy/utf8_spec.lua
index c16b1c45f4..d33ba6b5fd 100644
--- a/test/functional/legacy/utf8_spec.lua
+++ b/test/functional/legacy/utf8_spec.lua
@@ -4,9 +4,10 @@ local helpers = require('test.functional.helpers')
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local execute, expect = helpers.execute, helpers.expect
local eq, eval = helpers.eq, helpers.eval
+local source = helpers.source
describe('utf8', function()
- setup(clear)
+ before_each(clear)
it('is working', function()
insert('start:')
@@ -50,4 +51,33 @@ describe('utf8', function()
eq(1, eval('strchars("\\u20dd", 0)'))
eq(1, eval('strchars("\\u20dd", 1)'))
end)
+
+ it('customlist completion', function()
+ source([[
+ function! CustomComplete1(lead, line, pos)
+ return ['あ', 'い']
+ endfunction
+ command -nargs=1 -complete=customlist,CustomComplete1 Test1 echo]])
+ feed(":Test1 <C-L>'<C-B>$put='<CR>")
+
+ source([[
+ function! CustomComplete2(lead, line, pos)
+ return ['あたし', 'あたま', 'あたりめ']
+ endfunction
+ command -nargs=1 -complete=customlist,CustomComplete2 Test2 echo]])
+ feed(":Test2 <C-L>'<C-B>$put='<CR>")
+
+ source([[
+ function! CustomComplete3(lead, line, pos)
+ return ['Nこ', 'Nん', 'Nぶ']
+ endfunction
+ command -nargs=1 -complete=customlist,CustomComplete3 Test3 echo]])
+ feed(":Test3 <C-L>'<C-B>$put='<CR>")
+
+ expect([[
+
+ Test1
+ Test2 あた
+ Test3 N]])
+ end)
end)