aboutsummaryrefslogtreecommitdiff
path: root/test/functional/viml/completion_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-05-04 21:53:10 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-05-04 21:53:10 -0400
commit4ac5a0a924190484d7dcde34090f1d8e5bc46607 (patch)
treefb18b56b5f12afc990209ec7d41076483015bb1a /test/functional/viml/completion_spec.lua
parenta62cc5f807a6dc730c871c1fd53f29805a9cdc6e (diff)
parentfd3088b425b8c1f4f41eb715201e429ddd37af32 (diff)
downloadrneovim-4ac5a0a924190484d7dcde34090f1d8e5bc46607.tar.gz
rneovim-4ac5a0a924190484d7dcde34090f1d8e5bc46607.tar.bz2
rneovim-4ac5a0a924190484d7dcde34090f1d8e5bc46607.zip
Merge pull request #4644 from KillTheMule/vim-7.4.882
vim-patch:7.4.882
Diffstat (limited to 'test/functional/viml/completion_spec.lua')
-rw-r--r--test/functional/viml/completion_spec.lua48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/functional/viml/completion_spec.lua b/test/functional/viml/completion_spec.lua
index 408bb51235..0271540fe3 100644
--- a/test/functional/viml/completion_spec.lua
+++ b/test/functional/viml/completion_spec.lua
@@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')
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 insert = helpers.insert
local execute, source, expect = helpers.execute, helpers.source, helpers.expect
describe('completion', function()
@@ -713,5 +714,52 @@ describe('completion', function()
{3:-- Keyword completion (^N^P) }{4:match 2 of 2} |
]])
end)
+
+ describe('from the commandline window', function()
+ it('is cleared after CTRL-C', function ()
+ feed('q:')
+ feed('ifoo faa fee f')
+ screen:expect([[
+ |
+ {8:[No Name] }|
+ :foo faa fee f^ |
+ :~ |
+ :~ |
+ :~ |
+ {9:[Command Line] }|
+ {3:-- INSERT --} |
+ ]], {[3] = {bold = true},
+ [4] = {bold = true, foreground = Screen.colors.SeaGreen},
+ [8] = {reverse = true},
+ [9] = {bold = true, reverse = true}})
+ feed('<c-x><c-n>')
+ screen:expect([[
+ |
+ {8:[No Name] }|
+ :foo faa fee foo^ |
+ :~ {2: foo } |
+ :~ {1: faa } |
+ :~ {1: fee } |
+ {9:[Command Line] }|
+ {3:-- Keyword Local completion (^N^P) }{4:match 1 of 3} |
+ ]],{[1] = {background = Screen.colors.LightMagenta},
+ [2] = {background = Screen.colors.Grey},
+ [3] = {bold = true},
+ [4] = {bold = true, foreground = Screen.colors.SeaGreen},
+ [8] = {reverse = true},
+ [9] = {bold = true, reverse = true}})
+ feed('<c-c>')
+ screen:expect([[
+ |
+ {8:[No Name] }|
+ :foo faa fee foo |
+ :~ |
+ :~ |
+ :~ |
+ {9:[Command Line] }|
+ :foo faa fee foo^ |
+ ]], {[8] = {reverse = true}, [9] = {bold = true, reverse = true}})
+ end)
+ end)
end)