diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-08 22:33:21 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-08 22:36:20 -0400 |
commit | 0d0eeff8a34b01db93fb271fbeac3ad2d372a0e0 (patch) | |
tree | 9ad6ef39f8578c2c22bd0cf3ddd5afeb18bcd9c1 /src | |
parent | ec273a2c6ba055810539f2d58353c9c0fc8db320 (diff) | |
download | rneovim-0d0eeff8a34b01db93fb271fbeac3ad2d372a0e0.tar.gz rneovim-0d0eeff8a34b01db93fb271fbeac3ad2d372a0e0.tar.bz2 rneovim-0d0eeff8a34b01db93fb271fbeac3ad2d372a0e0.zip |
eval: add v:_null_string
Replacement for Vim's test_null_string().
Vim uses it to verify that its codebase handles null strings.
Preparation for the Test_null_list() in patch v8.2.1822.
Use v:_null_string, not non-existent env var, for null string tests.
Mention v:_null_string in id() because id(v:_null_string) returns (nil).
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 1 | ||||
-rw-r--r-- | src/nvim/eval.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index ed78bfbb24..b310fd49b0 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -229,6 +229,7 @@ static struct vimvar { // Neovim VV(VV_STDERR, "stderr", VAR_NUMBER, VV_RO), VV(VV_MSGPACK_TYPES, "msgpack_types", VAR_DICT, VV_RO), + VV(VV__NULL_STRING, "_null_string", VAR_STRING, VV_RO), VV(VV__NULL_LIST, "_null_list", VAR_LIST, VV_RO), VV(VV__NULL_DICT, "_null_dict", VAR_DICT, VV_RO), VV(VV_LUA, "lua", VAR_PARTIAL, VV_RO), diff --git a/src/nvim/eval.h b/src/nvim/eval.h index c681660771..a62d87fcc4 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -158,6 +158,7 @@ typedef enum { // Neovim VV_STDERR, VV_MSGPACK_TYPES, + VV__NULL_STRING, // String with NULL value. For test purposes only. VV__NULL_LIST, // List with NULL value. For test purposes only. VV__NULL_DICT, // Dictionary with NULL value. For test purposes only. VV_LUA, |