test: remove a few more redundant clear() calls (#35903)

This commit is contained in:
zeertzjq
2025-09-24 14:25:54 +08:00
committed by GitHub
parent b256e0476b
commit eb7c12d3e3
14 changed files with 13 additions and 40 deletions

View File

@@ -58,6 +58,7 @@ end)
describe(':cquit', function()
local function test_cq(cmdline, exit_code, redir_msg)
if redir_msg then
n.clear()
eq(
redir_msg,
pcall_err(function()
@@ -66,16 +67,13 @@ describe(':cquit', function()
)
poke_eventloop()
assert_alive()
n.check_close()
else
local p = n.spawn_wait('--cmd', cmdline)
eq(exit_code, p.status)
end
end
before_each(function()
n.clear()
end)
it('exits with non-zero after :cquit', function()
test_cq('cquit', 1, nil)
end)