mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 14:25:32 +00:00
test: suppress DSR wait warning when running tests (#38126)
Problem:
The DSR wait warning causes any test that involves Nvim TUI to become
flaky on Windows. Example:
FAILED test/functional/terminal/cursor_spec.lua @ 367: :terminal cursor can be positioned arbitrarily
test/functional/terminal\cursor_spec.lua:377: Row 1 did not match.
Expected:
|*^ |
|*~ |
|*~ |
|*~ |
|*~ |
|* |
|{5:-- TERMINAL --} |
Actual:
|* |
|* |
|*{2: }|
|*{103:defaults.lua: Did not detect DSR response from ter}|
|*{103:minal. This results in a slower startup time. }|
|*{UNEXPECTED foreground = tonumber('0x000006'):Press ENTER or type command to continue^ }|
|{5:-- TERMINAL --} |
Solution:
Don't show the DSR wait warning when running tests.
This commit is contained in:
@@ -890,9 +890,13 @@ do
|
||||
|
||||
-- Wait until detection of OSC 11 capabilities is complete to
|
||||
-- ensure background is automatically set before user config.
|
||||
if not vim.wait(100, function()
|
||||
return did_dsr_response
|
||||
end, 1) then
|
||||
if
|
||||
not vim.wait(100, function()
|
||||
return did_dsr_response
|
||||
end, 1)
|
||||
-- Don't show the warning when running tests to avoid flakiness.
|
||||
and os.getenv('NVIM_TEST') == nil
|
||||
then
|
||||
vim.notify(
|
||||
'defaults.lua: Did not detect DSR response from terminal. This results in a slower startup time.',
|
||||
vim.log.levels.WARN
|
||||
|
||||
Reference in New Issue
Block a user