summaryrefslogtreecommitdiff
path: root/subplot.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-11-27 18:04:24 +0200
committerLars Wirzenius <liw@liw.fi>2021-11-27 19:00:01 +0200
commit5b54da926b996819dacf69056020f02cba464c3d (patch)
tree4001b7b22cc9317f41fa0e98e45674346b8fab61 /subplot.md
parent1d317988771b05d9850718957befbba8cd90016e (diff)
downloadsubplot-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.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/subplot.md b/subplot.md
index 03e965e..b1c500b 100644
--- a/subplot.md
+++ b/subplot.md
@@ -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