From: Bram Moolenaar Date: Tue, 18 Aug 2020 21:24:13 +0000 (+0200) Subject: patch 8.2.1484: flaky failure in assert_fails() X-Git-Tag: v8.2.1484 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b02d64cff7664b9643205d6e23b08da688fe87a;p=vim patch 8.2.1484: flaky failure in assert_fails() Problem: Flaky failure in assert_fails(). Solution: Only used fourth argument if there is a third argument. --- diff --git a/src/testing.c b/src/testing.c index 09718760a..ed2d511f2 100644 --- a/src/testing.c +++ b/src/testing.c @@ -615,7 +615,8 @@ f_assert_fails(typval_T *argvars, typval_T *rettv) goto theend; } - if (!error_found && argvars[3].v_type == VAR_NUMBER + if (!error_found && argvars[2].v_type != VAR_UNKNOWN + && argvars[3].v_type == VAR_NUMBER && argvars[3].vval.v_number >= 0 && argvars[3].vval.v_number != emsg_assert_fails_lnum) { diff --git a/src/version.c b/src/version.c index 028b910a1..80f464a36 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 */ +/**/ + 1484, /**/ 1483, /**/