From 5ed49a34462399f481696db61f71e5c7f694af74 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Sun, 11 Mar 2018 22:28:20 +0100 Subject: [PATCH] use default complete for re_lex --- lib/ecoli_node_re_lex.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- 2.39.5