tinyyarn

scenario testing of Unix command line tools
Log | Files | Refs | README | LICENSE

commit d056f24f7b07910ac35c7d832bff517deaf66d9f
parent eb24ce8f67ceec13d14e297080ff12437338f9f0
Author: Richard Ipsum <richardipsum@vx21.xyz>
Date:   Wed, 15 Jul 2020 21:36:13 +0100

err if scenario file has no scenarios

Diffstat:
Mtyarn.lua.in | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tyarn.lua.in b/tyarn.lua.in @@ -567,13 +567,19 @@ if parsed_args["debug"] or DEBUG then end end -scenario_list, scenarios = parse_scenarios(parsed_args[1]) +scenario_filepath = parsed_args[1] +scenario_list, scenarios = parse_scenarios(scenario_filepath) implementations = {} seen = {} failed = {} nfailed = 0 +if scenario_list == nil then + io.stderr:write(string.format("No scenarios found in '%s'\n", scenario_filepath)) + os.exit(1) +end + for i = 2, #parsed_args do parse_implementations(parsed_args[i], implementations) end