mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +00:00
vim-patch:partial:8.2.3335: Vim9: not enough tests run with Vim9
Problem: Vim9: not enough tests run with Vim9.
Solution: Run a few more tests in Vim9 script and :def function. Fix that
items(), keys() and values9) return zero for a NULL dict.
Make join() return an empty string for a NULL list. Make sort()
return an empty list for a NULL list.
ef98257593
Skip f_reverse() change for consistency with other functions.
Skip Test_null_list() and Test_null_dict() because of missing patches.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -3019,11 +3019,12 @@ static void tv_dict_list(typval_T *const tv, typval_T *const rettv, const DictLi
|
||||
emsg(_(e_dictreq));
|
||||
return;
|
||||
}
|
||||
if (tv->vval.v_dict == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
tv_list_alloc_ret(rettv, tv_dict_len(tv->vval.v_dict));
|
||||
if (tv->vval.v_dict == NULL) {
|
||||
// NULL dict behaves like an empty dict
|
||||
return;
|
||||
}
|
||||
|
||||
TV_DICT_ITER(tv->vval.v_dict, di, {
|
||||
typval_T tv_item = { .v_lock = VAR_UNLOCKED };
|
||||
|
Reference in New Issue
Block a user