function assert define

NAME [edit section]

assert_define

SYNOPSIS [edit section]

DESCRIPTION [edit section]

This function checks that the indicated variable is defined. Otherwise, it aborts the currently running test.

An optional message can be provided for the abort call.

EXAMPLES [edit section]

Here are some sample invocations:

This second example shows use of assert_define following a call to is_on_target, as well as the use of an optional message if the variable is not defined.

ENVIRONMENT and ARGUMENTS [edit section]

The positional arguments to assert_define are:

RETURN [edit section]

Returns non-zero on error.

SOURCE [edit section]

Located in scripts/functions.sh

SEE ALSO [edit section]