functional-test-runner: Check, if context could be created

This commit is contained in:
Laria 2023-09-04 14:05:01 +02:00
parent 387b4bfd99
commit 3bb47d6ad3

View file

@ -164,6 +164,11 @@ runtest(const char *filename)
.output_writer = apfl_io_string_writer(&output),
});
if (ctx == NULL) {
fprintf(stderr, "Could not create context\n");
return T_ERR;
}
struct apfl_io_string_reader_data src_data = apfl_io_string_reader_create(parts.script);
struct apfl_io_reader r = apfl_io_string_reader(&src_data);
apfl_iterative_runner runner = apfl_iterative_runner_new(ctx, apfl_io_reader_as_source_reader(&r));