Mercurial > vim
changeset 21869:25ef87c95880 v8.2.1484
patch 8.2.1484: flaky failure in assert_fails()
Commit: https://github.com/vim/vim/commit/9b02d64cff7664b9643205d6e23b08da688fe87a
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 18 23:24:13 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 18 Aug 2020 23:30:04 +0200 |
parents | ca21a4cb5081 |
children | e32848bb87f2 |
files | src/testing.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testing.c +++ b/src/testing.c @@ -615,7 +615,8 @@ f_assert_fails(typval_T *argvars, typval 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) {