From: Bram Moolenaar Date: Thu, 18 Jun 2020 16:33:59 +0000 (+0200) Subject: patch 8.2.1002: test may fail when run directly X-Git-Tag: v8.2.1002 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ceb2e7751089bd417c6250d63e28616483b5796b;p=thirdparty%2Fvim.git 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 #6285) --- diff --git a/src/testdir/term_util.vim b/src/testdir/term_util.vim index 7c071bb3f8..7a73adbe07 100644 --- 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) diff --git a/src/version.c b/src/version.c index 5d69674a84..34bb99bb86 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1002, /**/ 1001, /**/