From 52682b19b9e9055e99bb5f1988ae7764fa0e7158 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 25 Oct 2016 07:34:56 +0200 Subject: Add file and merge redirects, cleanups to testscript grammar --- doc/testscript.cli | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'doc/testscript.cli') diff --git a/doc/testscript.cli b/doc/testscript.cli index 9a137eb..4586432 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -733,7 +733,7 @@ setup-line: '+' command teardown-line: '-' command test-line: command -command: (' '+(|redirect))* command-exit? +command: (' '+(|redirect|cleanup))* command-exit? *here-document redirect: stdin|stdout|stderr @@ -745,12 +745,17 @@ stderr: '2'(out-redirect) in-redirect: '<-'|\ '<+'|\ ('<'|'<:') |\ - ('<<'|'<<:') + ('<<'|'<<:') |\ + '<<<' out-redirect: '>-'|\ '>+'|\ + '>&' ('1'|'2')|\ ('>'|'>:') |\ - ('>>'|'>>:') + ('>>'|'>>:') |\ + ('>>>'|'>>>&') + +cleanup: '&' (|) command-exit: ('=='|'!=') @@ -771,6 +776,10 @@ $* 2 >! $* a1>! \ +In merge redirects the left-hand-side descriptor (implied or explicit) must +not be the same as the right-hand-side. Having both merge redirects at the +same time is illegal. + Here-line is like double-quoted string but recognizes newlines. \ -- cgit v1.1