api/vim,functests: Add tests for nvim_parse_expression, fix found bugs

This commit is contained in:
ZyX
2017-11-05 02:41:44 +03:00
parent 07ec709141
commit 7bc6de7526
7 changed files with 6908 additions and 27 deletions

View File

@@ -1492,7 +1492,7 @@ static void parse_quoted_string(ParserState *const pstate,
node->data.str.value = NULL;
} else {
char *v_p;
v_p = node->data.str.value = xmalloc(size);
v_p = node->data.str.value = xmallocz(size);
p = s + 1;
while (p < e) {
const char *const chunk_e = memchr(p, '\'', (size_t)(e - p));