aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/editor/mode_cmdline_spec.lua21
-rw-r--r--test/functional/lua/system_spec.lua12
2 files changed, 31 insertions, 2 deletions
diff --git a/test/functional/editor/mode_cmdline_spec.lua b/test/functional/editor/mode_cmdline_spec.lua
index efd7a37c0b..bb74dfe12f 100644
--- a/test/functional/editor/mode_cmdline_spec.lua
+++ b/test/functional/editor/mode_cmdline_spec.lua
@@ -38,6 +38,27 @@ describe('cmdline', function()
feed([[:<C-R>="foo\nbar\rbaz"<CR>]])
eq('foo\nbar\rbaz', fn.getcmdline())
end)
+
+ it('pasting handles composing chars properly', function()
+ local screen = Screen.new(60, 4)
+ -- 'arabicshape' cheats and always redraws everything which trivially works,
+ -- this test is for partial redraws in 'noarabicshape' mode.
+ command('set noarabicshape')
+ screen:attach()
+ fn.setreg('a', '💻')
+ feed(':test 🧑‍')
+ screen:expect([[
+ |
+ {1:~ }|*2
+ :test 🧑‍^ |
+ ]])
+ feed('<c-r><c-r>a')
+ screen:expect([[
+ |
+ {1:~ }|*2
+ :test 🧑‍💻^ |
+ ]])
+ end)
end)
it('Ctrl-Shift-V supports entering unsimplified key notations', function()
diff --git a/test/functional/lua/system_spec.lua b/test/functional/lua/system_spec.lua
index 482bfcf1a9..afbada007d 100644
--- a/test/functional/lua/system_spec.lua
+++ b/test/functional/lua/system_spec.lua
@@ -9,7 +9,7 @@ local function system_sync(cmd, opts)
return exec_lua(function()
local obj = vim.system(cmd, opts)
- if opts.timeout then
+ if opts and opts.timeout then
-- Minor delay before calling wait() so the timeout uv timer can have a headstart over the
-- internal call to vim.wait() in wait().
vim.wait(10)
@@ -75,7 +75,7 @@ describe('vim.system', function()
it('kill processes', function()
exec_lua(function()
- local signal
+ local signal --- @type integer?
local cmd = vim.system({ 'cat', '-' }, { stdin = true }, function(r)
signal = r.signal
end) -- run forever
@@ -112,4 +112,12 @@ describe('vim.system', function()
)
eq(true, exec_lua([[return _G.processed]]))
end)
+
+ if t.is_os('win') then
+ it('can resolve windows command extentions.', function()
+ t.write_file('test.bat', 'echo hello world')
+ system_sync({ 'chmod', '+x', 'test.bat' })
+ system_sync({ './test' })
+ end)
+ end
end)