changeset 20901:7d0fe945278c v8.2.1002

patch 8.2.1002: test may fail when run directly Commit: https://github.com/vim/vim/commit/ceb2e7751089bd417c6250d63e28616483b5796b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 18 18:33:59 2020 +0200 patch 8.2.1002: test may fail when run directly Problem: Test may fail when run directly. Solution: Check if g:run_nr exists. (Christian Brabandt, closes https://github.com/vim/vim/issues/6285)
author Bram Moolenaar <Bram@vim.org>
date Thu, 18 Jun 2020 18:45:04 +0200
parents b3ace9daf20b
children b9319ee1f118
files src/testdir/term_util.vim src/version.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/term_util.vim
+++ b/src/testdir/term_util.vim
@@ -28,10 +28,12 @@ endfunc
 " The second argument is the minimum time to wait in msec, 10 if omitted.
 func TermWait(buf, ...)
   let wait_time = a:0 ? a:1 : 10
-  if g:run_nr == 2
-    let wait_time *= 4
-  elseif g:run_nr > 2
-    let wait_time *= 10
+  if exists('g:run_nr')
+    if g:run_nr == 2
+      let wait_time *= 4
+    elseif g:run_nr > 2
+      let wait_time *= 10
+    endif
   endif
   call term_wait(a:buf, wait_time)
 
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1002,
+/**/
     1001,
 /**/
     1000,