diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-12-15 14:59:43 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-12-18 17:50:20 +0000 |
commit | 3cbc89918b0a0565afe7216579d4e321063a96c9 (patch) | |
tree | ab5690c2ac11eea3c761a330ee11e4db737225e9 /subplot.md | |
parent | cdafd6710fafa5a65a1806b019c7b0cb32d10b50 (diff) | |
download | subplot-3cbc89918b0a0565afe7216579d4e321063a96c9.tar.gz |
check: Add verification of bad filename check
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -485,6 +485,35 @@ permits the generated test suites to use native language types directly. The `file` type, if used, must refer to an embedded file in the document; sp-docgen will emit a warning if the file is not found, and sp-codegen will emit an error. +### Embedded file name didn't match + +```scenario +given file badfilename.md +and file b.yaml +and file f.py +and an installed subplot +when I run sp-docgen badfilename.md -o foo.pdf +then file foo.pdf exists +when I try to run sp-codegen --run badfilename.md -o test.py +then command fails +``` + +~~~{#badfilename.md .file .markdown .numberLines} +--- +title: Bad filenames in matched steps do not permit codegen +bindings: b.yaml +functions: f.py +template: python +... + +# Bad filename + +```scenario +given file missing.md +``` + +~~~ + ## Functions file Functions implementing steps are supported in Bash and Python. The @@ -656,6 +685,10 @@ then bar was done function: bar_was_done - then: foobar was done function: foobar_was_done +- given: file {filename} + function: provide_file + types: + filename: file ~~~ |