aboutsummaryrefslogtreecommitdiff
path: root/doc/testscript.cli
diff options
context:
space:
mode:
Diffstat (limited to 'doc/testscript.cli')
-rw-r--r--doc/testscript.cli66
1 files changed, 38 insertions, 28 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli
index 1aff571..a5aef9d 100644
--- a/doc/testscript.cli
+++ b/doc/testscript.cli
@@ -711,23 +711,33 @@ command-exit: ('=='|'!=') <exit-status>
command: <path> (' '+ <arg>)* {stdin? stdout? stderr?}
-stdin: '0'? ('<!'|\
- '<' <text>|\
- '<<' <here-end>)
+stdin: '0'?('<!'|\
+ '<' <text>|\
+ '<<' <here-end>)
-stdout: '1'? ('>!'|\
- '>' <text>|\
- '>>' <here-end>)
+stdout: '1'?('>!'|\
+ '>' <text>|\
+ '>>' <here-end>)
-stderr: '2' ('>!'|\
- '>' <text>|\
- '>>' <here-end>)
+stderr: '2'('>!'|\
+ '>' <text>|\
+ '>>' <here-end>)
here-document:
<text>*
<here-end>
\
+Note that if specified, file descriptors must not be separated from the
+redirect operator with whitespaces. In other words, the following command
+has \c{2} as an argument and redirects \c{stdout}, not \c{stderr}.
+
+Here-line is like double-quoted string by recognizes newlines.
+
+\
+$* 2 >!
+\
+
\
script:
(script-scope|script-line)*
@@ -782,25 +792,25 @@ command-pipe: command ('|' command)*
command: <path> (' '+ <arg>)* {stdin? stdout? stderr? cleanup*}
-stdin: '0'? ('<!'|\
- '<?'|\
- '<' <text>|\
- '<<' <here-end>|\
- '<<<' <file>)
-
-stdout: '1'? ('>!'|\
- '>?'|\
- '>&' '2'|\
- '>' <text>|\
- '>>' <here-end>|\
- ('>>>'|'>>>&') <file>)
-
-stderr: '2' ('>!'|\
- '>?'|\
- '>&' '1' |\
- '>' <text>|\
- '>>' <here-end>|\
- ('>>>'|'>>>&') <file>)
+stdin: ('<!'|\
+ '<?'|\
+ '<' <text>|\
+ '<<' <here-end>|\
+ '<<<' <file>)
+
+stdout: ('>!'|\
+ '>?'|\
+ '>&' '2'|\
+ '>' <text>|\
+ '>>' <here-end>|\
+ ('>>>'|'>>>&') <file>)
+
+stderr: '2' ('>!'|\
+ '>?'|\
+ '>&' '1' |\
+ '>' <text>|\
+ '>>' <here-end>|\
+ ('>>>'|'>>>&') <file>)
cleanup: '&' (<file>|<dir>)