From 79a83d6dd0f312a5e390f5627f68cc96c4427d33 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 24 Oct 2016 18:00:05 +0200 Subject: Add support for setup/teardown commands --- doc/testscript.cli | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'doc') 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: ('='|'+='|'=+') value-attributes? value-attributes: '[' ']' -test-line: - *((variable-line|command-line) ';') - command-line - -command-line: - command +setup-line: '+' command +teardown-line: '-' command +test-line: command command: (' '+(|redirect))* command-exit? *here-document -- cgit v1.1