aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_spec.lua
diff options
context:
space:
mode:
authorDongdong Zhou <dzhou121@gmail.com>2017-04-28 06:51:16 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2017-10-26 09:35:12 +0200
commit550651c130c014e6c668644273db31dd96be475e (patch)
treee3723a1101e6e1648e1d7fa526d92b9e7904458c /test/functional/ui/cmdline_spec.lua
parentb7a8a76f6e3b2de1cfdf32e3ccc66d87ab8e5cad (diff)
downloadrneovim-550651c130c014e6c668644273db31dd96be475e.tar.gz
rneovim-550651c130c014e6c668644273db31dd96be475e.tar.bz2
rneovim-550651c130c014e6c668644273db31dd96be475e.zip
ext_cmdline: use standard external ui functions
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r--test/functional/ui/cmdline_spec.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index d0726f5924..35cacbf4d0 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -7,23 +7,21 @@ if helpers.pending_win32(pending) then return end
describe('External command line completion', function()
local screen
local shown = false
- local firstc, prompt, content, pos
+ local firstc, prompt, content, pos, char, shift
before_each(function()
clear()
screen = Screen.new(25, 5)
- screen:attach({rgb=true, cmdline_external=true})
+ screen:attach({rgb=true, ext_cmdline=true})
screen:set_on_event_handler(function(name, data)
if name == "cmdline_enter" then
shown = true
elseif name == "cmdline_leave" then
shown = false
- elseif name == "cmdline_firstc" then
- firstc = data[1]
- elseif name == "cmdline_prompt" then
- prompt = data[1]
- elseif name == "cmdline" then
- content, pos = unpack(data)
+ elseif name == "cmdline_show" then
+ content, pos, firstc, prompt = unpack(data)
+ elseif name == "cmdline_char" then
+ char, shift = unpack(data)
elseif name == "cmdline_pos" then
pos = data[1]
end
@@ -120,6 +118,8 @@ describe('External command line completion', function()
|
]], nil, nil, function()
eq("3", content)
+ eq("\"", char)
+ eq(1, shift)
end)
end)