summaryrefslogtreecommitdiff
path: root/subplot.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-07-20 15:47:04 +0300
committerLars Wirzenius <liw@liw.fi>2021-07-20 15:47:40 +0300
commit258ee4398bde99009663ff23521cbfd8324312a0 (patch)
tree0ef9f779477eb2a8b02161ce1255e5283a6c69db /subplot.md
parent08063f6d7241817cf1a04367be25b0c43202c15b (diff)
downloadsubplot-258ee4398bde99009663ff23521cbfd8324312a0.tar.gz
feat: when more than one bindings match a step, list all of them
Sponsored-by: author
Diffstat (limited to 'subplot.md')
-rw-r--r--subplot.md21
1 files changed, 19 insertions, 2 deletions
diff --git a/subplot.md b/subplot.md
index 6ddc2c7..07c07de 100644
--- a/subplot.md
+++ b/subplot.md
@@ -2561,7 +2561,9 @@ then command fails
title: Two bindings match
template: python
bindings:
-- badbindings.yaml
+- twobindings.yaml
+functions:
+- a_function.py
...
# Broken scenario because step has two possible bindings
@@ -2570,12 +2572,27 @@ given a binding
```
~~~~
+~~~{#twobindings.yaml .file .yaml}
+- given: a {xyzzy}
+ function: a_function
+- given: a {plugh}
+ function: a_function
+~~~
+
+~~~{#a_function.py .file .python}
+def a_function(ctx):
+ assert 0
+~~~
+
```scenario
given file twobindings.md
-and file badbindings.yaml
+and file twobindings.yaml
+given file a_function.py
and an installed subplot
when I try to run subplot codegen --run twobindings.md -o test.py
then command fails
+then stderr contains "xyzzy"
+then stderr contains "plugh"
```