From: Olivier Matz Date: Sun, 11 Mar 2018 21:28:20 +0000 (+0100) Subject: use default complete for re_lex X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5ed49a34462399f481696db61f71e5c7f694af74;p=protos%2Flibecoli.git use default complete for re_lex --- diff --git a/lib/ecoli_node_re_lex.c b/lib/ecoli_node_re_lex.c index 672e952..252ebfd 100644 --- a/lib/ecoli_node_re_lex.c +++ b/lib/ecoli_node_re_lex.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -156,7 +157,7 @@ static void ec_node_re_lex_free_priv(struct ec_node *gen_node) static struct ec_node_type ec_node_re_lex_type = { .name = "re_lex", .parse = ec_node_re_lex_parse, - //.complete = ec_node_re_lex_complete, //XXX + .complete = ec_node_default_complete, .size = sizeof(struct ec_node_re_lex), .free_priv = ec_node_re_lex_free_priv, }; @@ -266,6 +267,11 @@ static int ec_node_re_lex_testcase(void) testres |= EC_TEST_CHECK_PARSE(node, 1, ""); testres |= EC_TEST_CHECK_PARSE(node, -1, "foobar"); + /* no completion */ + testres |= EC_TEST_CHECK_COMPLETE(node, + "", EC_NODE_ENDLIST, + EC_NODE_ENDLIST); + ec_node_free(node); return testres;