aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/testscript.cli21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli
index c039ec0..7b3d472 100644
--- a/doc/testscript.cli
+++ b/doc/testscript.cli
@@ -2334,6 +2334,27 @@ echo <string>...
Write strings to \c{stdout} separating them with a single space and ending
with a newline.
+
+\h#builtins-exit|\c{exit}|
+
+\
+exit [<diagnostics>]
+\
+
+Exit the current group or test scope skipping any remaining commands.
+
+Note that \c{exit} is a \i{pseudo-builtin}. In particular, it must be the only
+command in the pipe expression and its standard streams cannot be redirected.
+
+Without any arguments \c{exit} exits the current scope successfully. In this
+case, if exiting a group scope, teardown commands and cleanups are executed
+normally.
+
+If an argument is specified, then \c{exit} exits the current scope and all
+the outer scopes unsuccessfully, as if the \c{exit} command failed. In this
+case the argument must be the diagnostics string describing the error.
+
+
\h#builtins-false|\c{false}|
\