From c0fa721adeabf1d93ad71e598782b52c43d8e8f7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 25 Jul 2023 19:02:39 +0800 Subject: fix(startup): make recovery mode work without --headless (#24477) --- test/functional/core/startup_spec.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/functional/core/startup_spec.lua') diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index dcbb55a9d7..c1e07f0c76 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -21,6 +21,7 @@ local nvim_set = helpers.nvim_set local read_file = helpers.read_file local retry = helpers.retry local rmdir = helpers.rmdir +local skip = helpers.skip local sleep = helpers.sleep local startswith = helpers.startswith local write_file = helpers.write_file @@ -460,6 +461,18 @@ describe('startup', function() ]]) end) + it('-r works without --headless in PTY #23294', function() + skip(is_os('win')) + eq({ 0 }, exec_lua([[return vim.fn.jobwait({ vim.fn.jobstart({...}, { + pty = true, + stdout_buffered = true, + on_stdout = function(_, data, _) + _G.Recovery_stdout = data + end, + }) })]], nvim_prog, '-u', 'NONE', '-i', 'NONE', '-r')) + matches('Swap files found:\r*', exec_lua('return _G.Recovery_stdout[1]')) + end) + it('fixed hang issue with --headless (#11386)', function() local expected = '' local period = 100 -- cgit