summaryrefslogtreecommitdiffstats
path: root/test/parser/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/parser/utils.c')
-rw-r--r--test/parser/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/parser/utils.c b/test/parser/utils.c
index a1d0ad2..69b0006 100644
--- a/test/parser/utils.c
+++ b/test/parser/utils.c
@@ -131,7 +131,12 @@ int test_run_parser(struct parser_test *test, const char *parser_name)
continue;
test->ctx->parser = parser;
rc = parser->parse(test->ctx, test->conf.buf, test->conf.size);
+ break;
}
+ if (i == n_parsers)
+ errx(EXIT_FAILURE, "%s: parser '%s' not found",
+ __func__, parser_name);
+
return rc;
}
OpenPOWER on IntegriCloud