diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-01-22 17:10:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-22 17:10:29 +0800 |
commit | d46ebd2a74036a349606213fcd2a8b3530adebcf (patch) | |
tree | c7b087ab87823ec2092abd3caca8de1e9658b3f8 /test/functional/core/main_spec.lua | |
parent | a66f6add29fd8b2ee352c6089ceca6ab4f522385 (diff) | |
download | rneovim-d46ebd2a74036a349606213fcd2a8b3530adebcf.tar.gz rneovim-d46ebd2a74036a349606213fcd2a8b3530adebcf.tar.bz2 rneovim-d46ebd2a74036a349606213fcd2a8b3530adebcf.zip |
fix(startup): avoid crash with completion from -l script (#32160)
Related #27764
Diffstat (limited to 'test/functional/core/main_spec.lua')
-rw-r--r-- | test/functional/core/main_spec.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/functional/core/main_spec.lua b/test/functional/core/main_spec.lua index 6add49ceae..65a7c556b8 100644 --- a/test/functional/core/main_spec.lua +++ b/test/functional/core/main_spec.lua @@ -67,12 +67,22 @@ describe('command-line option', function() eq(#'100500\n', attrs.size) end) - it('does not crash when run completion in Ex mode', function() + it('does not crash when running completion in Ex mode', function() local p = n.spawn_wait('--clean', '-e', '-s', '--cmd', 'exe "norm! i\\<C-X>\\<C-V>"', '--cmd', 'qa!') eq(0, p.status) end) + it('does not crash when running completion from -l script', function() + local lua_fname = 'Xinscompl.lua' + write_file(lua_fname, [=[vim.cmd([[exe "norm! i\<C-X>\<C-V>"]])]=]) + finally(function() + os.remove(lua_fname) + end) + local p = n.spawn_wait('--clean', '-l', lua_fname) + eq(0, p.status) + end) + it('does not crash after reading from stdin in non-headless mode', function() skip(is_os('win')) local screen = Screen.new(40, 8) |