diff options
author | ZyX <kp-pav@yandex.ru> | 2017-11-13 01:10:39 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-11-13 01:11:13 +0300 |
commit | 342239a9c53cf4857d18c0583d4cab1fdca534fa (patch) | |
tree | dd957eb85b19d5ed69e04caf16d767f62ca94c79 /test/symbolic/klee/viml_expressions_parser.c | |
parent | 39c75d31be98e4cbb63a01c398d89e231f71f380 (diff) | |
download | rneovim-342239a9c53cf4857d18c0583d4cab1fdca534fa.tar.gz rneovim-342239a9c53cf4857d18c0583d4cab1fdca534fa.tar.bz2 rneovim-342239a9c53cf4857d18c0583d4cab1fdca534fa.zip |
unittests,viml/parser/expressions: Start adding asgn parsing tests
Diffstat (limited to 'test/symbolic/klee/viml_expressions_parser.c')
-rw-r--r-- | test/symbolic/klee/viml_expressions_parser.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/symbolic/klee/viml_expressions_parser.c b/test/symbolic/klee/viml_expressions_parser.c index fd75e8d355..9a876ed3fa 100644 --- a/test/symbolic/klee/viml_expressions_parser.c +++ b/test/symbolic/klee/viml_expressions_parser.c @@ -93,6 +93,20 @@ int main(const int argc, const char *const *const argv, const ExprAST ast = viml_pexpr_parse(&pstate, (int)flags); assert(ast.root != NULL || ast.err.msg); + if (flags & kExprFlagsParseLet) { + assert(ast.err.msg != NULL + || ast.root->type == kExprNodeAssignment + || (ast.root->type == kExprNodeListLiteral + && ast.root->children != NULL) + || ast.root->type == kExprNodeComplexIdentifier + || ast.root->type == kExprNodeCurlyBracesIdentifier + || ast.root->type == kExprNodePlainIdentifier + || ast.root->type == kExprNodeRegister + || ast.root->type == kExprNodeEnvironment + || ast.root->type == kExprNodeOption + || ast.root->type == kExprNodeSubscript + || ast.root->type == kExprNodeConcatOrSubscript); + } // Can’t possibly have more highlight tokens then there are bytes in string. assert(kv_size(colors) <= INPUT_SIZE - shift); kvi_destroy(colors); |