aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/core/job_spec.lua23
-rw-r--r--test/functional/lua/vim_spec.lua6
-rw-r--r--test/functional/ui/decorations_spec.lua10
3 files changed, 33 insertions, 6 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index 613dff577a..befbd4bc3b 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -700,7 +700,7 @@ describe('jobs', function()
os.remove('Xtest_jobstart_env')
end)
- describe('jobwait', function()
+ describe('jobwait()', function()
before_each(function()
if is_os('win') then
helpers.set_shell_powershell()
@@ -874,6 +874,27 @@ describe('jobs', function()
eq({'notification', 'wait', {{-1, -1}}}, next_msg())
end)
end)
+
+ it('hides cursor when waiting', function()
+ local screen = Screen.new(30, 3)
+ screen:set_default_attr_ids({
+ [0] = {foreground = Screen.colors.Blue1, bold = true};
+ })
+ screen:attach()
+ command([[let g:id = jobstart([v:progpath, '--clean', '--headless'])]])
+ feed_command('call jobwait([g:id], 300)')
+ screen:expect{grid=[[
+ |
+ {0:~ }|
+ :call jobwait([g:id], 300) |
+ ]], timeout=100}
+ funcs.jobstop(meths.get_var('id'))
+ screen:expect{grid=[[
+ ^ |
+ {0:~ }|
+ :call jobwait([g:id], 300) |
+ ]]}
+ end)
end)
pending('exit event follows stdout, stderr', function()
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index c69990d84b..1ebfa9dd1d 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -2438,6 +2438,12 @@ describe('lua stdlib', function()
end)
it('allows removing on_key listeners', function()
+ -- Create some unused namespaces
+ meths.create_namespace('unused1')
+ meths.create_namespace('unused2')
+ meths.create_namespace('unused3')
+ meths.create_namespace('unused4')
+
insert([[hello world]])
exec_lua [[
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua
index 68c3e73e61..9c16f76359 100644
--- a/test/functional/ui/decorations_spec.lua
+++ b/test/functional/ui/decorations_spec.lua
@@ -2024,26 +2024,26 @@ describe('extmark decorations', function()
it("highlights do reapply to restored text after delete", function()
with_undo_restore(true) -- also default behavior
- feed 'u'
+ command('silent undo')
screen:expect{grid=[[
^for _,{1:item in} ipairs(items) do |
local text, hl_id_cell, count = unpack(item) |
if hl_id_cell ~= nil then |
hl_id = hl_id_cell |
- 1 change; before #2 0 seconds ago |
+ |
]]}
end)
- it("highlights don't reapply to restored text after delete with no_undo_restore", function()
+ it("highlights don't reapply to restored text after delete with undo_restore=false", function()
with_undo_restore(false)
- feed 'u'
+ command('silent undo')
screen:expect{grid=[[
^for _,it{1:em in} ipairs(items) do |
local text, hl_id_cell, count = unpack(item) |
if hl_id_cell ~= nil then |
hl_id = hl_id_cell |
- 1 change; before #2 0 seconds ago |
+ |
]]}
eq({ { 1, 0, 8, { end_col = 13, end_right_gravity = false, end_row = 0,