]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.1002: test may fail when run directly v8.2.1002
authorBram Moolenaar <Bram@vim.org>
Thu, 18 Jun 2020 16:33:59 +0000 (18:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 18 Jun 2020 16:33:59 +0000 (18:33 +0200)
Problem:    Test may fail when run directly.
Solution:   Check if g:run_nr exists. (Christian Brabandt, closes #6285)

src/testdir/term_util.vim
src/version.c

index 7c071bb3f86322399c73744d9ed1eaede8b1edcb..7a73adbe07abb97983a3edb650446bbc078f6289 100644 (file)
@@ -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)
 
index 5d69674a8417a8a79c375399cb338059a033b624..34bb99bb86a5e88f0cda5fdc68b256df05523a0d 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1002,
 /**/
     1001,
 /**/