verify error instruction

Description

The verify error instruction is used to verify (to ensure) that an error occurred during the execution of a test instruction.

This is useful to test any situation that must produce a runtime error. For example, it enables us to verify that a command really produces a runtime error if it is called with an invalid input argument value.

The verify error instruction can only be used in test scripts (see the section called “test script”) and it is typically executed after a test instruction.

Syntax

Table 8.30. verify error syntax

ProductionSyntaxLinks
verify_error_instruction "verify" "error" error_info ? the section called “verify error instruction”
error_info ( "error_message" ":" expression ) ? ( "error_id" ":" identifier ) ? ( "error_data" ":" expression ) ? the section called “error info

Examples

see:

See also