diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-18 23:24:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-18 23:24:13 +0200 |
commit | 9b02d64cff7664b9643205d6e23b08da688fe87a (patch) | |
tree | 804dcf431045364147355ac16b2cde1be7e75773 /src/testing.c | |
parent | 165036ddba1318576a29f75d82fae8c326a48f18 (diff) | |
download | vim-git-9b02d64cff7664b9643205d6e23b08da688fe87a.tar.gz |
patch 8.2.1484: flaky failure in assert_fails()v8.2.1484
Problem: Flaky failure in assert_fails().
Solution: Only used fourth argument if there is a third argument.
Diffstat (limited to 'src/testing.c')
-rw-r--r-- | src/testing.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |