aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-24 18:00:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:35 +0200
commit79a83d6dd0f312a5e390f5627f68cc96c4427d33 (patch)
treef66a0a33ea9d18bf1e85d7c4503fc923028edc80 /doc
parent2c0a2b0d688b4450c72cde12ecedaa3fc3c9662a (diff)
Add support for setup/teardown commands
Diffstat (limited to 'doc')
-rw-r--r--doc/testscript.cli32
1 files changed, 23 insertions, 9 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli
index 0a4bd8f..9a137eb 100644
--- a/doc/testscript.cli
+++ b/doc/testscript.cli
@@ -704,20 +704,34 @@ here-document fragments.
\
script:
- *script-line
+ scope-body
-script-line:
- variable-line|test-line
+scope-body:
+ *setup
+ *(scope|test)
+ *teardown
+
+setup:
+ variable-line|setup-line
+
+teardown:
+ variable-line|teardown-line
+
+scope:
+ '{'
+ scope-body
+ '}'
+
+test:
+ *((variable-line|test-line) ';')
+ test-line
variable-line: <variable> ('='|'+='|'=+') value-attributes? <value>
value-attributes: '[' <key-value-pairs> ']'
-test-line:
- *((variable-line|command-line) ';')
- command-line
-
-command-line:
- command
+setup-line: '+' command
+teardown-line: '-' command
+test-line: command
command: <path>(' '+(<arg>|redirect))* command-exit?
*here-document