From ef7cb7ea3e6fcb21a4fcf38602b3f43f03232ace Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 1 Dec 2016 17:08:31 +0200 Subject: 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. --- doc/testscript.cli | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'doc/testscript.cli') 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: +(':' ) 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: ('='|'+='|'=+') value-attributes? value-attributes: '[' ']' -- cgit v1.1