aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-22 11:09:33 +0200
committerGitHub <noreply@github.com>2022-09-22 11:09:33 +0200
commit7fc5f6605fb3de361c970a1d22a42a905a072a0c (patch)
treeffe2148ab3193f2c122ed43e9655e3179b17c1e5 /test/functional/helpers.lua
parent8d13b08a03c31cdb269b7d09c166e0b447f2a303 (diff)
parent02f8ca59a80cd3570593c717ff6ceadc33239b89 (diff)
downloadrneovim-7fc5f6605fb3de361c970a1d22a42a905a072a0c.tar.gz
rneovim-7fc5f6605fb3de361c970a1d22a42a905a072a0c.tar.bz2
rneovim-7fc5f6605fb3de361c970a1d22a42a905a072a0c.zip
Merge pull request #20249 from bfredl/cmdmessage
fix(redraw): avoid unnecessary redraws and glitches with floats+messages
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index d672037a1e..eff54b6d4a 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -380,10 +380,23 @@ local function remove_args(args, args_rm)
return new_args
end
+function module.check_close(old_session)
+ local start_time = luv.now()
+ old_session:close()
+ luv.update_time() -- Update cached value of luv.now() (libuv: uv_now()).
+ local end_time = luv.now()
+ local delta = end_time - start_time
+ if delta > 500 then
+ print("nvim took " .. delta .. " milliseconds to exit after last test\n"..
+ "This indicates a likely problem with the test even if it passed!\n")
+ io.stdout:flush()
+ end
+end
+
--- @param io_extra used for stdin_fd, see :help ui-option
function module.spawn(argv, merge, env, keep, io_extra)
if session and not keep then
- session:close()
+ module.check_close(session)
end
local child_stream = ChildProcessStream.spawn(