aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-01 17:08:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-01 17:08:31 +0200
commitef7cb7ea3e6fcb21a4fcf38602b3f43f03232ace (patch)
tree7a37583dbe227019e62571d57c92613de3dd4b13 /doc
parent5e71edfa033f163ded9a82f7d66412d8ee05bc48 (diff)
Implement testscript variable-if
Now a variable-only if is treated the same as a single variable when deciding whether it is part of a test or setup/teardown.
Diffstat (limited to 'doc')
-rw-r--r--doc/testscript.cli22
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli
index c09e69c..eaccd0a 100644
--- a/doc/testscript.cli
+++ b/doc/testscript.cli
@@ -740,10 +740,10 @@ description:
+(':' <text>)
setup:
- variable-line|setup-line
+ variable-like|setup-line
tdown:
- variable-line|tdown-line
+ variable-like|tdown-line
setup-line: '+' command-like
tdown-line: '-' command-like
@@ -752,6 +752,24 @@ test:
?description
+(variable-line|command-like)
+variable-like:
+ variable-line|variable-if
+
+variable-if: ('if'|'if!') command-line
+ variable-if-body
+ *variable-elif
+ ?variable-else
+ 'end'
+
+variable-elif: ('elif'|'elif!') command-line
+ variable-if-body
+
+variable-else: 'else'
+ variable-if-body
+
+variable-if-body:
+ *variable-like
+
variable-line: <variable> ('='|'+='|'=+') value-attributes? <value>
value-attributes: '[' <key-value-pairs> ']'