summaryrefslogtreecommitdiff
path: root/src/testing.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-10 21:26:37 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-10 21:26:37 +0100
commitf52f0606ed9ea19bcfc3a8343af9958f2d99eaf7 (patch)
tree1fd2ccebf68aca966d10acdacf36a99badea66c5 /src/testing.c
parentc23555de346c53f8f6c478635c2d9e5f2992dd7f (diff)
downloadvim-git-f52f0606ed9ea19bcfc3a8343af9958f2d99eaf7.tar.gz
patch 8.2.2586: process id may be invalidv8.2.2586
Problem: Process id may be invalid. Solution: Use sysinfo.uptime to check for recent reboot. (suggested by Hugo van der Sanden, closes #7947)
Diffstat (limited to 'src/testing.c')
-rw-r--r--src/testing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testing.c b/src/testing.c
index 6d4f588f8..df19b9eb4 100644
--- a/src/testing.c
+++ b/src/testing.c
@@ -970,6 +970,8 @@ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
ui_delay_for_testing = val;
else if (STRCMP(name, (char_u *)"term_props") == 0)
reset_term_props_on_termresponse = val;
+ else if (STRCMP(name, (char_u *)"uptime") == 0)
+ override_sysinfo_uptime = val;
else if (STRCMP(name, (char_u *)"ALL") == 0)
{
disable_char_avail_for_testing = FALSE;
@@ -979,6 +981,7 @@ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
no_query_mouse_for_testing = FALSE;
ui_delay_for_testing = 0;
reset_term_props_on_termresponse = FALSE;
+ override_sysinfo_uptime = -1;
if (save_starting >= 0)
{
starting = save_starting;