commit 5922bf2f21d20e4b60fb99d37b196779e0f3c2ba
parent 63662e03b75cb771a0ef070aaf8cba741ca2deda
Author: Richard Ipsum <richardipsum@vx21.xyz>
Date: Thu, 28 Nov 2019 19:15:47 +0000
Error if scenario is invalid
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/tyarn.in b/tyarn.in
@@ -147,6 +147,11 @@ function parse_scenario_line(scenario, scenario_name, steps_seen,
-- continuation of previous scenario line
scenario[#scenario] = scenario[#scenario] .. ' ' .. lstrip(string.gsub(stripped_line, '^...', '', 1))
+ elseif tyarn.re_match(line, "^( )[ \t]*.+") then
+ io.stderr:write(string.format(
+ 'Scenario "%s" (line %d) invalid scenario line: %s\n',
+ scenario_name, line_no, stripped_line))
+ os.exit(1)
end
return last_step_type