From bda0165514a582978c2da672b528562df78a2d1a Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 4 Apr 2016 04:53:07 +0300 Subject: eval/encode: Make sure that encoder can encode NULL variables Adds two undocumented v: variables: _null_list and _null_dict because I do not know a reproducible way to get such lists (though I think I heard about this) and dictionaries (do not remember hearing about them). NULL strings are obtained using $XXX_UNEXISTENT_VAR_XXX. Fixes crash in json_encode($XXX_UNEXISTENT_VAR_XXX). Other added tests worked fine before this commit. --- src/nvim/eval.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/eval.h') diff --git a/src/nvim/eval.h b/src/nvim/eval.h index f81eb5d063..d6800afd52 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -122,6 +122,8 @@ typedef enum { VV_FALSE, VV_TRUE, VV_NULL, + VV__NULL_LIST, // List with NULL value. For test purposes only. + VV__NULL_DICT, // Dictionary with NULL value. For test purposes only. } VimVarIndex; /// All recognized msgpack types -- cgit