diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-05-14 07:46:35 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-05-14 07:56:15 +0300 |
commit | 113ed1a871fddae8ccf942c19fe6737106fb3e84 (patch) | |
tree | e44c6b885dc03e3f3ff9a16cf75d63e84caee256 /subplot.md | |
parent | 5b30f07a5989769397de7441ac9440e379a53488 (diff) | |
download | subplot-113ed1a871fddae8ccf942c19fe6737106fb3e84.tar.gz |
feat: check for duplicate scenario titles
Sponsored-by: author
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -1309,6 +1309,48 @@ then bar was done ``` ~~~~ +## Duplicate scenario titles + +_Requirement: Subplot treats it as an error if two scenarios have the +same title._ + +Justification: the title is how a scenario is identified, and the user +needs to be able to do so unambiguously. + +~~~scenario +given file duplicate-scenario-titles.subplot +given file duplicate-scenario-titles.md +given file b.yaml +given file f.py +given an installed subplot +when I try to run subplot metadata duplicate-scenario-titles.subplot +then command fails +then stderr contains "duplicate" +~~~ + +~~~~{#duplicate-scenario-titles.subplot .file .yaml .numberLines} +title: Test scenario +markdowns: +- duplicate-scenario-titles.md +bindings: [b.yaml] +impls: + python: [f.py] +~~~~ + +~~~~{#duplicate-scenario-titles.md .file .markdown .numberLines} +# My sceanrio + +```scenario +when I do bar +``` + +# My sceanrio + +```scenario +when I do bar +``` +~~~~ + ## Empty lines in scenarios This scenario verifies that empty lines in scenarios are OK. |