vim-patch:partial:8.2.1183: assert_fails() checks the last error message

Problem:    assert_fails() checks the last error message.
Solution:   Check the first error, it is more relevant.  Fix all the tests
            that rely on the old behavior.

9b7bf9e98f

Skip test_listener.vim, test_textprop.vim, test_viminfo.vim.
Skip test_python2.vim: affected line fails and hasn't been ported.
Skip test_python3.vim: affected lines fail and haven't been ported.
Skip CHECK_LIST_MATERIALIZE.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-05 07:24:06 +08:00
parent a86295cd5c
commit 8b0c5de4e0
38 changed files with 144 additions and 109 deletions

View File

@@ -663,6 +663,10 @@ static bool emsg_multiline(const char *s, bool multiline)
return true;
}
if (emsg_assert_fails_used && emsg_assert_fails_msg == NULL) {
emsg_assert_fails_msg = xstrdup(s);
}
// set "v:errmsg", also when using ":silent! cmd"
set_vim_var_string(VV_ERRMSG, s, -1);