aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-25 07:34:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:35 +0200
commit52682b19b9e9055e99bb5f1988ae7764fa0e7158 (patch)
tree334323c3a78845a0c5a81a7f64adbcd79b4c4cd2
parenta6ae456de2d2bb88de07c80560424e8fb644dfce (diff)
Add file and merge redirects, cleanups to testscript grammar
-rw-r--r--doc/testscript.cli15
1 files changed, 12 insertions, 3 deletions
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: <path>(' '+(<arg>|redirect))* command-exit?
+command: <path>(' '+(<arg>|redirect|cleanup))* command-exit?
*here-document
redirect: stdin|stdout|stderr
@@ -745,12 +745,17 @@ stderr: '2'(out-redirect)
in-redirect: '<-'|\
'<+'|\
('<'|'<:') <text>|\
- ('<<'|'<<:') <here-end>
+ ('<<'|'<<:') <here-end>|\
+ '<<<' <file>
out-redirect: '>-'|\
'>+'|\
+ '>&' ('1'|'2')|\
('>'|'>:') <text>|\
- ('>>'|'>>:') <here-end>
+ ('>>'|'>>:') <here-end>|\
+ ('>>>'|'>>>&') <file>
+
+cleanup: '&' (<file>|<dir>)
command-exit: ('=='|'!=') <exit-status>
@@ -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.
\