summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-06-20 14:39:53 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-06-20 14:39:53 +0100
commit4a745bd12a52ac12d58303f57e2660f3a051606e (patch)
tree7eb1981845cf258de137af895cf182bdaee70867
parent7572bc1ad516b9686427558e98a069738bace73d (diff)
downloadsubplot-4a745bd12a52ac12d58303f57e2660f3a051606e.tar.gz
test: Add scenario to validate case sensitivity in bindings
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--subplot.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/subplot.md b/subplot.md
index d975e97..b4fac99 100644
--- a/subplot.md
+++ b/subplot.md
@@ -1825,6 +1825,9 @@ binding.
- given: a (?:broken)? binding
function: a_broken_binding
regex: true
+- given: a capitalised Binding
+ function: os.getcwd
+ case_sensitive: true
```
### Steps which do not match bindings do not work
@@ -1850,6 +1853,28 @@ when I try to run sp-codegen --run nobinding.md -o test.py
then exit code is non-zero
```
+### Steps which do not case-sensitively match sensitive bindings do not work
+
+~~~~{#casemismatch.md .file .markdown}
+---
+title: Case sensitivity mismatch
+bindings:
+- badbindings.yaml
+...
+# Broken scenario because step has a case mismatch with sensitive binding
+
+```scenario
+given a capitalised binding
+```
+~~~~
+
+```scenario
+given file casemismatch.md
+and file badbindings.yaml
+when I try to run sp-codegen --run casemismatch.md -o test.py
+then exit code is non-zero
+```
+
### Steps which match more than one binding do not work
~~~~{#twobindings.md .file .markdown}