diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-06-07 18:24:54 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-06-07 18:24:54 +0300 |
commit | 21beb119ed2a8a1dcf1dfc8b6bd91d3ba46b10af (patch) | |
tree | 99cdb46451ea07079f279488f11783a794306055 /subplot.md | |
parent | ff61617ca720750cda810d16275485e973068af5 (diff) | |
download | subplot-21beb119ed2a8a1dcf1dfc8b6bd91d3ba46b10af.tar.gz |
feat! don't allow indented scenario steps
Some day we will have syntax for continuing a step to the next line.
This change makes it easier to introduce that syntax, without a
breaking change.
Sponsored-by: author
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -1059,6 +1059,42 @@ and step "then bar was done" was run and command is successful ~~~ +## Indented scenario steps are not allowed + +_Requirement: A scenario step starts at the beginning of the line._ + +Justification: We may want to allow continuing a step to the next +line, but as of June, 2023, we haven't settled on a syntax for this. +However, whatever syntax we do eventually choose, it will be easier +to add that if scenario steps start at the beginning of a line, +without making a breaking change. + +~~~scenario +given file indented-step.subplot +given file indented-step.md +given file b.yaml +given an installed subplot +when I try to run subplot docgen indented-step.subplot -o foo.html +then command fails +and stderr contains "indented" +~~~ + +~~~{#indented-step.subplot .file .yaml .numberLines} +title: Indented scenario step +markdowns: + - indented-step.md +bindings: + - b.yaml +~~~ + +~~~~~~{#indented-step.md .file .markdown .numberLines} +# This is a title + +~~~scenario + given precondition +~~~ +~~~~~~ + ## No scenarios means codegen fails If you attempt to `subplot codegen` on a document which contains no scenarios, the |