mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
eval: Make dictionary watchers work with empty keys
Looks like dict_notifications_spec test used to depend on some state which should not be preserved. Changed all `setup()` calls to `before_each()` and added necessary state in addition to changes required to test empty keys. Note: unit tests for tv_dict_watcher* are still needed.
This commit is contained in:
parent
1e3e302dc2
commit
a56f2d27e3
@ -160,7 +160,6 @@ static char *e_missbrac = N_("E111: Missing ']'");
|
|||||||
static char *e_listarg = N_("E686: Argument of %s must be a List");
|
static char *e_listarg = N_("E686: Argument of %s must be a List");
|
||||||
static char *e_listdictarg = N_(
|
static char *e_listdictarg = N_(
|
||||||
"E712: Argument of %s must be a List or Dictionary");
|
"E712: Argument of %s must be a List or Dictionary");
|
||||||
static char *e_emptykey = N_("E713: Cannot use empty key for Dictionary");
|
|
||||||
static char *e_listreq = N_("E714: List required");
|
static char *e_listreq = N_("E714: List required");
|
||||||
static char *e_dictreq = N_("E715: Dictionary required");
|
static char *e_dictreq = N_("E715: Dictionary required");
|
||||||
static char *e_stringreq = N_("E928: String required");
|
static char *e_stringreq = N_("E928: String required");
|
||||||
@ -2112,8 +2111,9 @@ static char_u *get_lval(char_u *const name, typval_T *const rettv,
|
|||||||
for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; ++len)
|
for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; ++len)
|
||||||
;
|
;
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
if (!quiet)
|
if (!quiet) {
|
||||||
EMSG(_(e_emptykey));
|
EMSG(_("E713: Cannot use empty key after ."));
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
p = key + len;
|
p = key + len;
|
||||||
|
Loading…
Reference in New Issue
Block a user