diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-11-27 18:04:24 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-11-27 19:00:01 +0200 |
commit | 5b54da926b996819dacf69056020f02cba464c3d (patch) | |
tree | 4001b7b22cc9317f41fa0e98e45674346b8fab61 /subplot.md | |
parent | 1d317988771b05d9850718957befbba8cd90016e (diff) | |
download | subplot-5b54da926b996819dacf69056020f02cba464c3d.tar.gz |
feat: warn about unused embedded files
This is merely a warning, for now, to stderr. subplot.md has two
embedded files used as examples, and I'm too tired to add a way to
indicate that it's OK for a specific file to not be used. That should
probably be added later, though.
Sponsored-by: author
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -2711,6 +2711,32 @@ This is another embedded file, and has the same name in uppercase. ``` ~~~~ + +### Fail if embedded file isn't used + +This scenario checks that we get warnings, when using a subplot with +embedded files that aren't used. + +~~~scenario +given file unusedfile.md +and an installed subplot +when I try to run subplot docgen unusedfile.md -o unusedfile.html +then command is successful +and file unusedfile.html exists +and stderr contains "thisisnotused.txt" +~~~ + +~~~~{#unusedfile.md .file .markdown .numberLines} +--- +title: Embedded file is not used by a scenario +... + +```{#thisisnotused.txt .file} +This is the embedded file. +``` +~~~~ + + ## Steps must match bindings Subplot permits the binding author to define arbitrarily complex regular |