aboutsummaryrefslogtreecommitdiff
path: root/doc/testscript.cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-09 11:29:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-09 11:29:23 +0200
commitf1cbb7c9d5c750366fa1918a53d0682f0633b1d9 (patch)
treef5b49b2b1052e693e5f26ec9cfdcee3d3d4e13c3 /doc/testscript.cli
parentfeab490f5f34bf8ecc52d2a439e68b3f2644ab47 (diff)
Various minor semantics changes in testscript language
The .include directive and if-else no longer have to be separated from the following token. This allows to make the decision by looking at just one token. The test scope can no longer have a description inside the scope. It should always be leading the scope itself.
Diffstat (limited to 'doc/testscript.cli')
-rw-r--r--doc/testscript.cli26
1 files changed, 20 insertions, 6 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli
index 6022d6c..123846f 100644
--- a/doc/testscript.cli
+++ b/doc/testscript.cli
@@ -718,17 +718,31 @@ teardown:
variable-line|teardown-line
scope:
- description?
+ ?description
+ scope-block|scope-if
+
+scope-block:
'{'
scope-body
'}'
+scope-if: ('if'|'if!') command-expr
+ scope-block
+ *scope-elif
+ ?scope-else
+
+scope-elif: ('elif'|'elif!') command-expr
+ scope-block
+
+scope-else: 'else'
+ scope-block
+
test:
- description?
+ ?description
*((variable-line|test-line) ';')
test-line (':' <text>)?
-include: '.include'(' '+'--once')*(' '+<path>)*
+include: '.include' (' '+'--once')*(' '+<path>)*
description:
+(':' <text>)
@@ -741,15 +755,15 @@ teardown-line: '-' command-line
test-line: command-line
command-line:
- command-if|command-expr
+ command-expr|command-if
-command-if: ('if'|'if!')' '+command-expr
+command-if: ('if'|'if!') command-expr
command-if-body
*command-elif
?command-else
'end'
-command-elif: ('elif'|'elif!')' '+command-expr
+command-elif: ('elif'|'elif!') command-expr
command-if-body
command-else: 'else'