From a56f2d27e3c09aaae00a58a70652ac5db3287dee Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 4 Dec 2016 22:35:10 +0300 Subject: 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. --- src/nvim/eval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 80278cf3bb..bd88678f16 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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_listdictarg = N_( "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_dictreq = N_("E715: Dictionary 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) ; if (len == 0) { - if (!quiet) - EMSG(_(e_emptykey)); + if (!quiet) { + EMSG(_("E713: Cannot use empty key after .")); + } return NULL; } p = key + len; -- cgit