mirror of
https://github.com/neovim/neovim.git
synced 2026-05-01 19:45:02 +00:00
test: update tests for auto-closing :term buffers
The terminal buffer closes automatically when using `:terminal` and the command exits without an error. This messes up some tests that expect the terminal buffer to still be open. We can force the buffer not to close by passing an argument to `:terminal`. This can be anything, since the shell-test stub simply prints whatever argument it's given.
This commit is contained in:
@@ -514,7 +514,9 @@ describe("'scrollback' option", function()
|
||||
|
||||
-- _Global_ scrollback=-1 defaults :terminal to 10_000.
|
||||
command('setglobal scrollback=-1')
|
||||
command('terminal')
|
||||
-- Pass a command to prevent the terminal buffer from automatically
|
||||
-- closing. The ':' command is just a no-op.
|
||||
command('terminal :')
|
||||
eq(10000, meths.get_option_value('scrollback', {}))
|
||||
|
||||
-- _Local_ scrollback=-1 in :terminal forces the _maximum_.
|
||||
|
||||
Reference in New Issue
Block a user