test(messages): skip os_delay during tests

Problem:
Tests that trigger `os_delay` messages may take 1-3 seconds, wasting
build/CI time, since this serves no purpose in tests.

Solution:
- Introduce `msg_delay` for cases where `os_delay` is being used as
  a "UI feature".
- Skip `msg_delay` in tests.
This commit is contained in:
Justin M. Keyes
2025-12-18 21:29:00 -05:00
parent 245a4696a2
commit 2eb11f21eb
13 changed files with 46 additions and 24 deletions

View File

@@ -1992,7 +1992,7 @@ buf_T *buflist_new(char *ffname_arg, char *sfname_arg, linenr_T lnum, int flags)
emsg(_("W14: Warning: List of file names overflow"));
if (emsg_silent == 0 && !in_assert_fails && !ui_has(kUIMessages)) {
ui_flush();
os_delay(3001, true); // make sure it is noticed
msg_delay(3001, true); // make sure it is noticed
}
top_file_num = 1;
}