neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 8ba7a966a1339767b19a5ca4449b38ef0cae49c7
parent 0d8293364f78237afb83d4822611d6fd8add66f8
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Sat,  5 Nov 2022 12:40:46 +0800

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.

https://github.com/vim/vim/commit/9b02d64cff7664b9643205d6e23b08da688fe87a

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Msrc/nvim/testing.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/nvim/testing.c b/src/nvim/testing.c @@ -529,7 +529,8 @@ void f_assert_fails(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) 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) { error_found = true;