Includes another test file if the named variable is defined. The first form includes a file relative to the current test file, while the second form includes a file from the
Includes another test file if the named variable is not defined. The first form includes a file relative to the current test file, while the second form includes a file from the
.BRipptool(8)
include directory.
.TP5
\fBSKIP\-IF\-DEFINED \fIvariable-name\fR
.TP5
\fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR
Specifies that the remainder of the test file should be skipped when the variable is or is not defined.
.TP5
\fBSTOP\-AFTER\-INCLUDE\-ERROR no\fR
.TP5
\fBSTOP\-AFTER\-INCLUDE\-ERROR yes\fR
Specifies whether tests will be stopped after an error in an included file.
.TP5
\fBTRANSFER auto\fR
Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
.TP5
\fBTRANSFER chunked\fR
Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: chunked" header. This is the default and is equivalent to specifying \fI\-c\fR on the
.BRipptool(8)
command-line. Support for chunked requests is required for conformance with all versions of IPP.
.TP5
\fBTRANSFER length\fR
Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" header. This is equivalent to specifying \fI\-l\fR on the
.BRipptool(8)
command-line. Support for content length requests is required for conformance with all versions of IPP.
.TP5
\fBVERSION 1.0\fR
.TP5
\fBVERSION 1.1\fR
.TP5
\fBVERSION 2.0\fR
.TP5
\fBVERSION 2.1\fR
.TP5
\fBVERSION 2.2\fR
Specifies the default IPP version number to use for the tests that follow.
.SSTESTDIRECTIVES
The following directives are understood within a \fItest\fR:
.TP5
\fBATTR \fIout-of-band-tag attribute-name\fR
.TP5
\fBATTR \fItag attribute-name value(s)\fR
Adds an attribute to the test request.
Out-of-band tags (admin-define, delete-attribute, no-value, not-settable, unknown, unsupported) have no value.
Specifies that the response must/may/must not include the named attribute. Additional requirements can be added as predicates - see the "EXPECT PREDICATES" section for more information on predicates. Attribute names can specify member attributes by separating the attribute and member names with the forward slash, for example "media\-col/media\-size/x\-dimension".
Specifies printer state monitoring tests to run in parallel with the test operation.
The monitoring tests will run until all of the \fBEXPECT\fR conditions are satisfied or the primary test operation has completed, whichever occurs first.
Specifies an expected response status-code value. Additional requirements can be added as predicates - see the "STATUS PREDICATES" section for more information on predicates.
Most value tags also support the specification of limits in parenthesis, for example "name(42)" would allow nameWith/WithoutLanguage strings up to 42 octets in length, "name(4:MAX)" would allow nameWith/WithoutLanguage strings between 4 and 255 octets in length, and "integer(-273:MAX)" would allow integers between -273 and 2147483647.
Requires that all values of the \fBEXPECT\fR attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range.
.TP5
\fBWITH\-ALL\-VALUES "false"\fR
.TP5
\fBWITH\-ALL\-VALUES "true"\fR
Requires that all values of the \fBEXPECT\fR attribute match the boolean value given.
Requires that all values of the \fBEXPECT\fR attribute match the regular expression, which must conform to the POSIX regular expression syntax.
Comparisons are case-sensitive.
.TP5
\fBWITH\-DISTINCT\-VALUES\fR
Requires that all values of the \fBEXPECT\fR attribute are unique.
Comparisons are case-sensitive.
Only charset, collection, enum, integer, keyword, mimeMediaType, naturalLanguage, rangeOfInteger, resolution, uriScheme attributes support this predicate.
Requires that at least one URI value contains a matching hostname.
.TP5
\fBWITH\-RESOURCE "\fIliteral string\fB"\fR
.TP5
\fBWITH\-RESOURCE "/\fIregular expression\fB/"\fR
Requires that at least one URI value contains a matching resource (including leading /).
.TP5
\fBWITH\-SCHEME "\fIliteral string\fB"\fR
.TP5
\fBWITH\-SCHEME "/\fIregular expression\fB/"\fR
Requires that at least one URI value contains a matching scheme.
.TP5
\fBWITH\-VALUE "\fIliteral string\fB"\fR
Requires that at least one value of the \fBEXPECT\fR attribute matches the literal string. Comparisons are case-sensitive.
.TP5
\fBWITH\-VALUE <\fInumber\fR
.TP5
\fBWITH\-VALUE =\fInumber\fR
.TP5
\fBWITH\-VALUE >\fInumber\fR
.TP5
\fBWITH\-VALUE \fInumber\fR[\fI,...,number\fR]
Requires that at least one value of the \fBEXPECT\fR attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range.
.TP5
\fBWITH\-VALUE "false"\fR
.TP5
\fBWITH\-VALUE "true"\fR
Requires that at least one value of the \fBEXPECT\fR attribute matches the boolean value given.
.TP5
\fBWITH\-VALUE "/\fIregular expression\fB/"\fR
Requires that at least one value of the \fBEXPECT\fR attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
.TP5
\fBWITH\-VALUE\-FROM \fIattribute-name\fR
Requires that the value(s) of the \fBEXPECT\fR attribute matches the value(s) in the specified attribute.
For example, "EXPECT job\-sheets WITH\-VALUE\-FROM job\-sheets\-supported" requires that the "job\-sheets" value is listed as a value of the "job\-sheets\-supported" attribute.
.SSSTATUSPREDICATES
The following predicates are understood following the \fBSTATUS\fR test directive:
.TP5
\fBDEFINE\-MATCH \fIvariable-name\fR
Defines the variable to "1" when the \fBSTATUS\fR matches. A side-effect of this predicate is that this \fBSTATUS\fR will never fail a test.
.TP5
\fBDEFINE\-NO\-MATCH \fIvariable-name\fR
Defines the variable to "1" when the \fBSTATUS\fR does not match. A side-effect of this predicate is that this \fBSTATUS\fR will never fail a test.
.TP5
\fBIF\-DEFINED \fIvariable-name\fR
Makes the \fBSTATUS\fR apply only if the specified variable is defined.
.TP5
\fBIF\-NOT\-DEFINED \fIvariable-name\fR
Makes the \fBSTATUS\fR apply only if the specified variable is not defined.
.TP5
\fBREPEAT\-LIMIT \fInumber\fR
.br
Specifies the maximum number of times to repeat. The default value is 1000.
.TP5
\fBREPEAT\-MATCH\fR
.TP5
\fBREPEAT\-NO\-MATCH\fR
Specifies that the current test should be repeated when the response status-code matches or does not match the value specified by the STATUS directive.
.SSOPERATIONCODES
Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of names supported by
Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of the names supported by
program maintains a list of variables that can be used in any literal string or attribute value by specifying "\fI$variable-name\fR". Aside from variables defined using the \fI-d\fR option or \fBDEFINE\fR directive, the following pre-defined variables are available:
.TP5
\fB$$\fR
Inserts a single "$" character.
.TP5
\fB$ENV[\fIname\fB]\fR
Inserts the value of the named environment variable, or an empty string if the environment variable is not defined.
.TP5
\fB$date-current\fR
Inserts the current date and time using the ISO-8601 format ("yyyy-mm-ddThh:mm:ssZ").
.TP5
\fB$date-start\fR
Inserts the starting date and time using the ISO-8601 format ("yyyy-mm-ddThh:mm:ssZ").
.TP5
\fB$filename\fR
Inserts the filename provided to
.BRipptool(8)
with the \fI-f\fR option.
.TP5
\fB$filetype\fR
Inserts the MIME media type for the filename provided to
.BRipptool(8)
with the \fI-f\fR option.
.TP5
\fB$hostname\fR
Inserts the hostname from the URI provided to
.BRipptool(8).
.TP5
\fB$job\-id\fR
Inserts the last "job\-id" attribute value returned in a test response or 0 if no "job\-id" attribute has been seen.
.TP5
\fB$job\-uri\fR
Inserts the last "job\-uri" attribute value returned in a test response or an empty string if no "job\-uri" attribute has been seen.
.TP5
\fB$notify\-subscription\-id\fR
Inserts the last "notify\-subscription\-id" attribute value returned in a test response or 0 if no "notify\-subscription\-id" attribute has been seen.
.TP5
\fB$port\fR
Inserts the port number from the URI provided to
.BRipptool(8).
.TP5
\fB$resource\fR
Inserts the resource path from the URI provided to