From 062e03325cf9bb7fecfb9ea254ceb5c0cf427a7a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 16 Jun 2017 23:43:24 +0300 Subject: Add support for exit testscript builtin --- doc/testscript.cli | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc') 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 ... Write strings to \c{stdout} separating them with a single space and ending with a newline. + +\h#builtins-exit|\c{exit}| + +\ +exit [] +\ + +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}| \ -- cgit v1.1