aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/vim_spec.lua
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-07-10 08:10:15 +0800
committerckelsel <ckelsel@hotmail.com>2017-07-10 08:10:15 +0800
commit465bbee520d1b1b57477fd7d80fbdeaf5e1e1e77 (patch)
treeedae38568202ba41dee4a49f78884da313fd114b /test/functional/api/vim_spec.lua
parent1514cdc7d8863eeee6b04883b1c50aac40048b49 (diff)
parent6725667d31591e8025589c4c1df34469f3bfdb52 (diff)
downloadrneovim-465bbee520d1b1b57477fd7d80fbdeaf5e1e1e77.tar.gz
rneovim-465bbee520d1b1b57477fd7d80fbdeaf5e1e1e77.tar.bz2
rneovim-465bbee520d1b1b57477fd7d80fbdeaf5e1e1e77.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r--test/functional/api/vim_spec.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index c531d4af46..e59b5d712d 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -373,6 +373,11 @@ describe('api', function()
'<NL>x<Esc>x<CR>x<lt>x', true, true, true))
end)
+ it('does not convert keycodes if special=false', function()
+ eq('<NL>x<Esc>x<CR>x<lt>x', helpers.nvim('replace_termcodes',
+ '<NL>x<Esc>x<CR>x<lt>x', true, true, false))
+ end)
+
it('does not crash when transforming an empty string', function()
-- Actually does not test anything, because current code will use NULL for
-- an empty string.
@@ -391,13 +396,13 @@ describe('api', function()
-- notice the special char(…) \xe2\80\xa6
nvim('feedkeys', ':let x1="…"\n', '', true)
- -- Both replace_termcodes and feedkeys escape \x80
+ -- Both nvim_replace_termcodes and nvim_feedkeys escape \x80
local inp = helpers.nvim('replace_termcodes', ':let x2="…"<CR>', true, true, true)
- nvim('feedkeys', inp, '', true)
+ nvim('feedkeys', inp, '', true) -- escape_csi=true
- -- Disabling CSI escaping in feedkeys
+ -- nvim_feedkeys with CSI escaping disabled
inp = helpers.nvim('replace_termcodes', ':let x3="…"<CR>', true, true, true)
- nvim('feedkeys', inp, '', false)
+ nvim('feedkeys', inp, '', false) -- escape_csi=false
helpers.stop()
end