mirror of
https://github.com/neovim/neovim.git
synced 2025-12-23 22:58:59 +00:00
feat(ex_cmds): consistent :restart behavior (#36723)
This commit is contained in:
@@ -351,8 +351,8 @@ describe('TUI :restart', function()
|
||||
restart_pid_check()
|
||||
gui_running_check()
|
||||
|
||||
-- Check ":restart +qall" on an unmodified buffer.
|
||||
tt.feed_data(':restart +qall\013')
|
||||
-- Check ":restart +qall!" on an unmodified buffer.
|
||||
tt.feed_data(':restart +qall!\013')
|
||||
screen_expect(s0)
|
||||
restart_pid_check()
|
||||
gui_running_check()
|
||||
@@ -397,8 +397,18 @@ describe('TUI :restart', function()
|
||||
restart_pid_check()
|
||||
gui_running_check()
|
||||
|
||||
-- Check ":restart" on the modified buffer.
|
||||
-- Check ":confirm restart +echo" correctly ignores ":confirm"
|
||||
tt.feed_data(':confirm restart +echo\013')
|
||||
screen:expect({ any = vim.pesc('+cmd did not quit the server') })
|
||||
|
||||
-- Check ":restart" on a modified buffer.
|
||||
tt.feed_data('ithis will be removed\027')
|
||||
tt.feed_data(':restart\013')
|
||||
screen:expect({ any = vim.pesc('Vim(qall):E37: No write since last change') })
|
||||
|
||||
-- Check ":restart +qall!" on a modified buffer.
|
||||
tt.feed_data('ithis will be removed\027')
|
||||
tt.feed_data(':restart +qall!\013')
|
||||
screen_expect(s0)
|
||||
restart_pid_check()
|
||||
gui_running_check()
|
||||
@@ -3979,7 +3989,7 @@ describe('TUI client', function()
|
||||
|
||||
-- Run :restart on the remote client.
|
||||
-- The remote client should start a new server while the original one should exit.
|
||||
feed_data(':restart\n')
|
||||
feed_data(':restart +qall!\n')
|
||||
screen_client:expect([[
|
||||
^ |
|
||||
{100:~ }|*3
|
||||
@@ -4081,7 +4091,7 @@ describe('TUI client', function()
|
||||
|
||||
-- Run :restart on the client.
|
||||
-- The client should start a new server while the original server should exit.
|
||||
feed_data(':restart\n')
|
||||
feed_data(':restart +qall!\n')
|
||||
screen_client:expect([[
|
||||
^ |
|
||||
{100:~ }|*4
|
||||
|
||||
Reference in New Issue
Block a user