diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-14 06:47:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-14 06:47:09 +0800 |
commit | 06bce8bf5c3b6a2753778461426212c61e9f2036 (patch) | |
tree | e08dc1a1ee59be246b1081540fd9e77add0b92c1 /test/functional/terminal/scrollback_spec.lua | |
parent | fc0ee871de2f56dbb80879c912203a6372c54e1c (diff) | |
download | rneovim-06bce8bf5c3b6a2753778461426212c61e9f2036.tar.gz rneovim-06bce8bf5c3b6a2753778461426212c61e9f2036.tar.bz2 rneovim-06bce8bf5c3b6a2753778461426212c61e9f2036.zip |
test(terminal): fix scrollback test flakiness (#24708)
Problem: Terminal scrollback test is flaky.
Solution: Use INTERACT flag so the job doesn't exit immediately.
Diffstat (limited to 'test/functional/terminal/scrollback_spec.lua')
-rw-r--r-- | test/functional/terminal/scrollback_spec.lua | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index ba0b663285..4a3005e082 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -379,9 +379,7 @@ describe("'scrollback' option", function() end) local function set_fake_shell() - -- shell-test.c is a fake shell that prints its arguments and exits. - nvim('set_option_value', 'shell', testprg('shell-test'), {}) - nvim('set_option_value', 'shellcmdflag', 'EXE', {}) + nvim('set_option_value', 'shell', string.format('"%s" INTERACT', testprg('shell-test')), {}) end local function expect_lines(expected, epsilon) @@ -514,9 +512,7 @@ describe("'scrollback' option", function() -- _Global_ scrollback=-1 defaults :terminal to 10_000. command('setglobal scrollback=-1') - -- Pass a command to prevent the terminal buffer from automatically - -- closing. The ':' command is just a no-op. - command('terminal :') + command('terminal') eq(10000, meths.get_option_value('scrollback', {})) -- _Local_ scrollback=-1 in :terminal forces the _maximum_. |