4.35. harness
Test harness block. Similar to try/catch. Interprets the body text and checks the return value against expected and explicitly bad cases.
Returns DIED, OK, or NOT OK message along with your result if not the expected value.
4.35.1. Summary
[harness other_named_attributes]
Parameters | Description | Default |
expected | Tagname for delimiting your expected return value (default "OK") | DEFAULT_VALUE |
name | This will appear in your output message (useful for distinguishing harness tags from one another) (default "testnnn") | DEFAULT_VALUE |
Attributes | Default |
interpolate | No |
reparse | Yes |
Other_Characteristics | |
Invalidates cache | no |
Container tag | Yes |
Has Subtags | No |
Nests | No |
Tag expansion example:
[harness] --- TODO: (tag result)
ASP-like Perl call:
$Tag->harness( { }, $body );
or similarly with positional parameters,
$Tag->harness(, $attribute_hash_reference, $body);
4.35.2. Description
Test harness block. Similar to try/catch. Interprets the body text and checks the return value against expected and explicitly bad cases.
Returns DIED, OK, or NOT OK message along with the harness name and your result if not the expected value.
4.35.2.1. expected
Tagname for delimiting your expected return value (default "OK")
4.35.2.2. name
This will appear in your output message (useful for distinguishing harness tags from one another) (default "testnnn")