]>
Commit | Line | Data |
---|---|---|
f8b3a85b | 1 | .\" |
f1dd3a39 | 2 | .\" ipptoolfile man page. |
f8b3a85b | 3 | .\" |
064e50fb | 4 | .\" Copyright © 2010-2021 by Apple Inc. |
f8b3a85b | 5 | .\" |
87030afb MS |
6 | .\" Licensed under Apache License v2.0. See the file "LICENSE" for more |
7 | .\" information. | |
f8b3a85b | 8 | .\" |
064e50fb | 9 | .TH ipptoolfile 5 "CUPS" "5 April 2021" "Apple Inc." |
f8b3a85b | 10 | .SH NAME |
aaf19ab0 | 11 | ipptoolfile \- ipptool file format |
f8b3a85b | 12 | .SH DESCRIPTION |
6b13fa61 MS |
13 | The |
14 | .BR ipptool (1) | |
f1dd3a39 MS |
15 | program accepts free-form plain text files that describe one or more IPP requests. |
16 | Comments start with the "#" character and continue to the end of the line. | |
17 | Each request is enclosed by curly braces, for example: | |
f8b3a85b MS |
18 | .nf |
19 | ||
20 | # This is a comment | |
21 | { | |
22 | # The name of the test | |
f1dd3a39 | 23 | NAME "Print PDF File" |
f8b3a85b MS |
24 | |
25 | # The request to send | |
6b13fa61 | 26 | OPERATION Print\-Job |
f1dd3a39 | 27 | |
6b13fa61 MS |
28 | GROUP operation\-attributes\-tag |
29 | ATTR charset attributes\-charset utf\-8 | |
30 | ATTR language attributes\-natural\-language en | |
31 | ATTR uri printer\-uri $uri | |
32 | ATTR name requesting\-user\-name $user | |
f1dd3a39 MS |
33 | ATTR mimeMediaType document\-format application/pdf |
34 | ||
35 | GROUP job\-attributes\-tag | |
36 | ATTR collection media\-col { | |
37 | # US Letter plain paper from the "main" tray | |
38 | MEMBER collection media\-size { | |
39 | MEMBER integer x\-dimension 21590 | |
40 | MEMBER integer y\-dimension 27940 | |
41 | } | |
42 | MEMBER integer media\-top\-margin 423 | |
43 | MEMBER integer media\-bottom\-margin 423 | |
44 | MEMBER integer media\-left\-margin 423 | |
45 | MEMBER integer media\-right\-margin 423 | |
46 | MEMBER keyword media\-source "main" | |
47 | MEMBER keyword media\-type "stationery" | |
48 | } | |
49 | ||
50 | FILE testfile.pdf | |
f8b3a85b MS |
51 | |
52 | # The response to expect | |
6b13fa61 MS |
53 | STATUS successful\-ok |
54 | EXPECT job\-id OF\-TYPE integer WITH\-VALUE >0 | |
55 | EXPECT job\-uri OF\-TYPE uri | |
f8b3a85b MS |
56 | } |
57 | { | |
58 | # The name of the test | |
f1dd3a39 | 59 | NAME "Wait for Job to Complete" |
f8b3a85b MS |
60 | |
61 | # The request to send | |
6b13fa61 | 62 | OPERATION Get\-Job\-Attributes |
f1dd3a39 | 63 | |
6b13fa61 MS |
64 | GROUP operation\-attributes\-tag |
65 | ATTR charset attributes\-charset utf\-8 | |
66 | ATTR language attributes\-natural\-language en | |
67 | ATTR uri printer\-uri $uri | |
68 | ATTR integer job\-id $job\-id | |
69 | ATTR name requesting\-user\-name $user | |
f8b3a85b MS |
70 | |
71 | # The response to expect | |
6b13fa61 MS |
72 | STATUS successful\-ok |
73 | EXPECT job\-id OF\-TYPE integer WITH\-VALUE $job\-id | |
74 | EXPECT job\-uri OF\-TYPE uri | |
f1dd3a39 | 75 | EXPECT job\-state OF\-TYPE enum WITH\-VALUE >5 REPEAT\-NO\-MATCH |
6b13fa61 | 76 | EXPECT job\-originating\-user\-name OF\-TYPE name WITH\-VALUE "$user" |
f1dd3a39 MS |
77 | |
78 | # Show the job state until completed... | |
79 | DISPLAY job-state | |
80 | DISPLAY job-state-reasons | |
f8b3a85b MS |
81 | } |
82 | .fi | |
6b13fa61 MS |
83 | .SS TOP-LEVEL DIRECTIVES |
84 | The following directives can be used outside of a \fItest\fR: | |
f8b3a85b | 85 | .TP 5 |
6b13fa61 | 86 | \fB{ \fItest \fB}\fR |
f8b3a85b MS |
87 | Defines a test. |
88 | .TP 5 | |
6b13fa61 MS |
89 | \fBDEFINE \fIvariable-name value\fR |
90 | Defines the named variable to the given value. This is equivalent to specifying \fI\-d variable-name=value\fR on the | |
91 | .BR ipptool (8) | |
92 | command-line. | |
f8b3a85b | 93 | .TP 5 |
6b13fa61 MS |
94 | \fBDEFINE\-DEFAULT \fIvariable-name value\fR |
95 | Defines the named variable to the given value if it does not already have a value. | |
321d8d57 | 96 | .TP 5 |
6b13fa61 | 97 | \fBFILE\-ID "\fIidentifier\fB"\fR |
1d47b929 MS |
98 | Specifies an identifier string for the current file. |
99 | .TP 5 | |
6b13fa61 | 100 | \fBIGNORE\-ERRORS yes\fR |
030ae6a1 | 101 | .TP 5 |
6b13fa61 MS |
102 | \fBIGNORE\-ERRORS no\fR |
103 | Specifies whether, by default, | |
104 | .BR ipptool (8) | |
105 | will ignore errors and continue with subsequent tests. | |
030ae6a1 | 106 | .TP 5 |
6b13fa61 | 107 | \fBINCLUDE "\fIfilename\fB"\fR |
f8b3a85b | 108 | .TP 5 |
6b13fa61 MS |
109 | \fBINCLUDE <\fIfilename\fB>\fR |
110 | Includes another test file. The first form includes a file relative to the current test file, while the second form includes a file from the | |
111 | .BR ipptool (8) | |
f8b3a85b MS |
112 | include directory. |
113 | .TP 5 | |
6b13fa61 | 114 | \fBINCLUDE\-IF\-DEFINED \fIname \fB"\fIfilename\fB"\fR |
321d8d57 | 115 | .TP 5 |
6b13fa61 MS |
116 | \fBINCLUDE\-IF\-DEFINED \fIname \fB<\fIfilename\fB>\fR |
117 | 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 | |
118 | .BR ipptool (8) | |
119 | include directory. | |
321d8d57 | 120 | .TP 5 |
6b13fa61 | 121 | \fBINCLUDE\-IF\-NOT\-DEFINED \fIname \fB"\fIfilename\fB"\fR |
321d8d57 | 122 | .TP 5 |
6b13fa61 MS |
123 | \fBINCLUDE\-IF\-NOT\-DEFINED \fIname \fB<\fIfilename\fB>\fR |
124 | 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 | |
125 | .BR ipptool (8) | |
126 | include directory. | |
321d8d57 | 127 | .TP 5 |
6b13fa61 | 128 | \fBSKIP\-IF\-DEFINED \fIvariable-name\fR |
030ae6a1 | 129 | .TP 5 |
6b13fa61 MS |
130 | \fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR |
131 | Specifies that the remainder of the test file should be skipped when the variable is or is not defined. | |
030ae6a1 | 132 | .TP 5 |
6b13fa61 | 133 | \fBSTOP\-AFTER\-INCLUDE\-ERROR no\fR |
9475ec92 | 134 | .TP 5 |
6b13fa61 | 135 | \fBSTOP\-AFTER\-INCLUDE\-ERROR yes\fR |
9475ec92 MS |
136 | Specifies whether tests will be stopped after an error in an included file. |
137 | .TP 5 | |
6b13fa61 MS |
138 | \fBTRANSFER auto\fR |
139 | Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. | |
f8b3a85b | 140 | .TP 5 |
6b13fa61 MS |
141 | \fBTRANSFER chunked\fR |
142 | 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 | |
143 | .BR ipptool (8) | |
144 | command-line. Support for chunked requests is required for conformance with all versions of IPP. | |
f8b3a85b | 145 | .TP 5 |
6b13fa61 MS |
146 | \fBTRANSFER length\fR |
147 | Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" header. This is equivalent to specifying \fI\-l\fR on the | |
148 | .BR ipptool (8) | |
149 | command-line. Support for content length requests is required for conformance with all versions of IPP. | |
f8b3a85b | 150 | .TP 5 |
6b13fa61 | 151 | \fBVERSION 1.0\fR |
f8b3a85b | 152 | .TP 5 |
6b13fa61 | 153 | \fBVERSION 1.1\fR |
f8b3a85b | 154 | .TP 5 |
6b13fa61 | 155 | \fBVERSION 2.0\fR |
f8b3a85b | 156 | .TP 5 |
6b13fa61 | 157 | \fBVERSION 2.1\fR |
f8b3a85b | 158 | .TP 5 |
6b13fa61 | 159 | \fBVERSION 2.2\fR |
f8b3a85b | 160 | Specifies the default IPP version number to use for the tests that follow. |
6b13fa61 MS |
161 | .SS TEST DIRECTIVES |
162 | The following directives are understood within a \fItest\fR: | |
f8b3a85b | 163 | .TP 5 |
2a75f21b MS |
164 | \fBATTR \fIout-of-band-tag attribute-name\fR |
165 | .TP 5 | |
6b13fa61 | 166 | \fBATTR \fItag attribute-name value(s)\fR |
f1dd3a39 | 167 | Adds an attribute to the test request. |
2a75f21b | 168 | Out-of-band tags (admin-define, delete-attribute, no-value, not-settable, unknown, unsupported) have no value. |
d784ca2f | 169 | Values for other tags are delimited by the comma (",") character - escape commas using the "\\" character. |
f1dd3a39 | 170 | Common attributes and values are listed in the IANA IPP registry - see references below. |
f8b3a85b | 171 | .TP 5 |
6b13fa61 | 172 | \fBATTR collection \fIattribute-name \fB{ MEMBER \fItag member-name value(s) ... \fB}\fR [ \fI... \fB,{ \fI... \fB} \fR] |
f1dd3a39 MS |
173 | Adds a collection attribute to the test request. |
174 | Member attributes follow the same syntax as regular attributes and can themselves be nested collections. | |
175 | Multiple collection values can be supplied as needed, separated by commas. | |
f8b3a85b | 176 | .TP 5 |
6b13fa61 | 177 | \fBCOMPRESSION deflate\fR |
c41769ff | 178 | .TP 5 |
6b13fa61 | 179 | \fBCOMPRESSION gzip\fR |
c41769ff | 180 | .TP 5 |
6b13fa61 MS |
181 | \fBCOMPRESSION none\fR |
182 | Uses the specified compression on the document data following the attributes in a Print-Job or Send-Document request. | |
c41769ff | 183 | .TP 5 |
f1dd3a39 MS |
184 | \fBDELAY \fIseconds\fR[\fI,repeat-seconds\fR] |
185 | Specifies a delay in seconds before this test will be run. | |
186 | If two values are specified, the second value is used as the delay between repeated tests. | |
f8b3a85b | 187 | .TP 5 |
6b13fa61 | 188 | \fBDISPLAY \fIattribute-name\fR |
f8b3a85b MS |
189 | Specifies that value of the named attribute should be output as part of the |
190 | test report. | |
191 | .TP 5 | |
6b13fa61 | 192 | \fBEXPECT \fIattribute-name \fR[ \fIpredicate(s) \fR] |
f8b3a85b | 193 | .TP 5 |
6b13fa61 | 194 | \fBEXPECT ?\fIattribute-name predicate(s)\fR |
f8b3a85b | 195 | .TP 5 |
6b13fa61 MS |
196 | \fBEXPECT !\fIattribute-name\fR |
197 | 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". | |
f8b3a85b | 198 | .TP 5 |
e83646d5 MS |
199 | \fBEXPECT-ALL \fIattribute-name \fR[ \fIpredicate(s) \fR] |
200 | .TP 5 | |
201 | \fBEXPECT-ALL ?\fIattribute-name predicate(s)\fR | |
202 | Specifies that the response must/may include the named attribute and that all occurrences of that attribute must match the given predicates. | |
203 | .TP 5 | |
6b13fa61 MS |
204 | \fBFILE filename\fR |
205 | Specifies a file to include at the end of the request. This is typically used when sending a test print file. | |
f8b3a85b | 206 | .TP 5 |
6b13fa61 | 207 | \fBGROUP tag\fR |
f8b3a85b MS |
208 | Specifies the group tag for subsequent attributes in the request. |
209 | .TP 5 | |
6b13fa61 | 210 | \fBIGNORE\-ERRORS yes\fR |
030ae6a1 | 211 | .TP 5 |
6b13fa61 MS |
212 | \fBIGNORE\-ERRORS no\fR |
213 | Specifies whether | |
214 | .BR ipptool (8) | |
215 | will ignore errors and continue with subsequent tests. | |
030ae6a1 | 216 | .TP 5 |
064e50fb MS |
217 | \fBMONITOR-PRINTER-STATE \fR[ \fIprinter-uri \fR] \fB{ EXPECT \fIattribute-name \fR[ \fIpredicate(s) \fR] \fB}\fR |
218 | Specifies printer state monitoring tests to run in parallel with the test operation. | |
219 | The monitoring tests will run until all of the \fBEXPECT\fR conditions are satisfied or the primary test operation has completed, whichever occurs first. | |
220 | .TP 5 | |
6b13fa61 | 221 | \fBNAME "\fIliteral string\fB"\fR |
f8b3a85b MS |
222 | Specifies the human-readable name of the test. |
223 | .TP 5 | |
6b13fa61 | 224 | \fBOPERATION \fIoperation-code\fR |
f8b3a85b MS |
225 | Specifies the operation to be performed. |
226 | .TP 5 | |
9fcdd250 MS |
227 | \fBPAUSE "\fImessage\fB"\fR |
228 | Displays the provided message and waits for the user to press a key to continue. | |
229 | .TP 5 | |
6b13fa61 | 230 | \fBREQUEST\-ID \fInumber\fR\fR |
f8b3a85b | 231 | .TP 5 |
6b13fa61 MS |
232 | \fBREQUEST\-ID random\fR |
233 | Specifies the request-id value to use in the request, either an integer or the word "random" to use a randomly generated value (the default). | |
f8b3a85b | 234 | .TP 5 |
6b13fa61 MS |
235 | \fBRESOURCE \fIpath\fR |
236 | Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the | |
237 | .BR ipptool (8) | |
238 | program. | |
f8b3a85b | 239 | .TP 5 |
6b13fa61 | 240 | \fBSKIP\-IF\-DEFINED \fIvariable-name\fR |
030ae6a1 | 241 | .TP 5 |
6b13fa61 MS |
242 | \fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR |
243 | Specifies that the current test should be skipped when the variable is or is not defined. | |
030ae6a1 | 244 | .TP 5 |
6b13fa61 | 245 | \fBSKIP\-PREVIOUS\-ERROR yes\fR |
030ae6a1 | 246 | .TP 5 |
6b13fa61 MS |
247 | \fBSKIP\-PREVIOUS\-ERROR no\fR |
248 | Specifies whether | |
249 | .BR ipptool (8) | |
250 | will skip the current test if the previous test resulted in an error/failure. | |
030ae6a1 | 251 | .TP 5 |
6b13fa61 MS |
252 | \fBSTATUS \fIstatus-code \fR[ \fIpredicate\fR ] |
253 | Specifies an expected response status-code value. Additional requirements can be added as predicates - see the "STATUS PREDICATES" section for more information on predicates. | |
f8b3a85b | 254 | .TP 5 |
6b13fa61 | 255 | \fBTEST\-ID "\fIidentifier\fR" |
1d47b929 MS |
256 | Specifies an identifier string for the current test. |
257 | .TP 5 | |
6b13fa61 MS |
258 | \fBTRANSFER auto\fR |
259 | Specifies that this test will use "Transfer-Encoding: chunked" if it has an attached file or "Content-Length:" otherwise. | |
f8b3a85b | 260 | .TP 5 |
6b13fa61 MS |
261 | \fBTRANSFER chunked\fR |
262 | Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" header. | |
f8b3a85b | 263 | .TP 5 |
6b13fa61 | 264 | \fBTRANSFER length\fR |
f8b3a85b MS |
265 | Specifies that this test will use the HTTP/1.0 "Content-Length:" header. |
266 | .TP 5 | |
6b13fa61 | 267 | \fBVERSION 1.0\fR |
f8b3a85b | 268 | .TP 5 |
6b13fa61 | 269 | \fBVERSION 1.1\fR |
f8b3a85b | 270 | .TP 5 |
6b13fa61 | 271 | \fBVERSION 2.0\fR |
f8b3a85b | 272 | .TP 5 |
6b13fa61 | 273 | \fBVERSION 2.1\fR |
f8b3a85b | 274 | .TP 5 |
6b13fa61 | 275 | \fBVERSION 2.2\fR |
f8b3a85b | 276 | Specifies the IPP version number to use for this test. |
6b13fa61 MS |
277 | .SS EXPECT PREDICATES |
278 | The following predicates are understood following the \fBEXPECT\fR test directive: | |
f8b3a85b | 279 | .TP 5 |
6b13fa61 MS |
280 | \fBCOUNT \fInumber\fR |
281 | Requires the \fBEXPECT\fR attribute to have the specified number of values. | |
f8b3a85b | 282 | .TP 5 |
6b13fa61 MS |
283 | \fBDEFINE\-MATCH \fIvariable-name\fR |
284 | Defines the variable to "1" when the \fBEXPECT\fR condition matches. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test. | |
030ae6a1 | 285 | .TP 5 |
6b13fa61 MS |
286 | \fBDEFINE\-NO\-MATCH \fIvariable-name\fR |
287 | Defines the variable to "1" when the \fBEXPECT\fR condition does not match. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test. | |
030ae6a1 | 288 | .TP 5 |
6b13fa61 MS |
289 | \fBDEFINE\-VALUE \fIvariable-name\fR |
290 | Defines the variable to the value of the attribute when the \fBEXPECT\fR condition matches. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test. | |
030ae6a1 | 291 | .TP 5 |
6b13fa61 MS |
292 | \fBIF\-DEFINED \fIvariable-name\fR |
293 | Makes the \fBEXPECT\fR conditions apply only if the specified variable is defined. | |
f8b3a85b | 294 | .TP 5 |
6b13fa61 MS |
295 | \fBIF\-NOT\-DEFINED \fIvariable-name\fR |
296 | Makes the \fBEXPECT\fR conditions apply only if the specified variable is not defined. | |
f8b3a85b | 297 | .TP 5 |
6b13fa61 MS |
298 | \fBIN\-GROUP \fItag\fR |
299 | Requires the \fBEXPECT\fR attribute to be in the specified group tag. | |
f8b3a85b | 300 | .TP 5 |
064e50fb | 301 | \fBOF\-TYPE \fItag[(limits)|tag|...]\fR |
6b13fa61 | 302 | Requires the \fBEXPECT\fR attribute to use one of the specified value tag(s). |
064e50fb | 303 | 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. |
f8b3a85b | 304 | .TP 5 |
6b13fa61 | 305 | \fBREPEAT\-LIMIT \fInumber\fR |
a29fd7dd | 306 | .br |
6b13fa61 | 307 | Specifies the maximum number of times to repeat if the \fBREPEAT-MATCH\fR or \fBREPEAT-NO-MATCH\fR predicate is specified. The default value is 1000. |
a29fd7dd | 308 | .TP 5 |
6b13fa61 | 309 | \fBREPEAT\-MATCH\fR |
83e08001 | 310 | .TP 5 |
6b13fa61 MS |
311 | \fBREPEAT\-NO\-MATCH\fR |
312 | Specifies that the current test should be repeated when the \fBEXPECT\fR condition matches or does not match. | |
83e08001 | 313 | .TP 5 |
6b13fa61 MS |
314 | \fBSAME\-COUNT\-AS \fIattribute-name\fR |
315 | Requires the \fBEXPECT\fR attribute to have the same number of values as the specified parallel attribute. | |
f8b3a85b | 316 | .TP 5 |
6b13fa61 | 317 | \fBWITH\-ALL\-HOSTNAMES "\fIliteral string\fB"\fR |
890a10b7 | 318 | .TP 5 |
6b13fa61 | 319 | \fBWITH\-ALL\-HOSTNAMES "/\fIregular expression\fB/"\fR |
890a10b7 MS |
320 | Requires that all URI values contain a matching hostname. |
321 | .TP 5 | |
6b13fa61 | 322 | \fBWITH\-ALL\-RESOURCES "\fIliteral string\fB"\fR |
890a10b7 | 323 | .TP 5 |
6b13fa61 | 324 | \fBWITH\-ALL\-RESOURCES "/\fIregular expression\fB/"\fR |
890a10b7 MS |
325 | Requires that all URI values contain a matching resource (including leading /). |
326 | .TP 5 | |
6b13fa61 | 327 | \fBWITH\-ALL\-SCHEMES "\fIliteral string\fB"\fR |
890a10b7 | 328 | .TP 5 |
6b13fa61 | 329 | \fBWITH\-ALL-SCHEMES "/\fIregular expression\fB/"\fR |
890a10b7 MS |
330 | Requires that all URI values contain a matching scheme. |
331 | .TP 5 | |
6b13fa61 MS |
332 | \fBWITH\-ALL\-VALUES "\fIliteral string\fB"\fR |
333 | Requires that all values of the \fBEXPECT\fR attribute match the literal string. Comparisons are case-sensitive. | |
82cc1f9a | 334 | .TP 5 |
6b13fa61 | 335 | \fBWITH\-ALL\-VALUES <\fInumber\fR |
82cc1f9a | 336 | .TP 5 |
6b13fa61 | 337 | \fBWITH\-ALL\-VALUES =\fInumber\fR |
82cc1f9a | 338 | .TP 5 |
6b13fa61 | 339 | \fBWITH\-ALL\-VALUES >\fInumber\fR |
82cc1f9a | 340 | .TP 5 |
6b13fa61 MS |
341 | \fBWITH\-ALL\-VALUES \fInumber\fR[\fI,...,number\fR] |
342 | 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. | |
82cc1f9a | 343 | .TP 5 |
6b13fa61 | 344 | \fBWITH\-ALL\-VALUES "false"\fR |
82cc1f9a | 345 | .TP 5 |
6b13fa61 MS |
346 | \fBWITH\-ALL\-VALUES "true"\fR |
347 | Requires that all values of the \fBEXPECT\fR attribute match the boolean value given. | |
82cc1f9a | 348 | .TP 5 |
6b13fa61 | 349 | \fBWITH\-ALL\-VALUES "/\fIregular expression\fB/"\fR |
064e50fb MS |
350 | Requires that all values of the \fBEXPECT\fR attribute match the regular expression, which must conform to the POSIX regular expression syntax. |
351 | Comparisons are case-sensitive. | |
352 | .TP 5 | |
353 | \fBWITH\-DISTINCT\-VALUES\fR | |
354 | Requires that all values of the \fBEXPECT\fR attribute are unique. | |
355 | Comparisons are case-sensitive. | |
356 | Only charset, enum, integer, keyword, mimeMediaType, naturalLanguage, rangeOfInteger, resolution, uriScheme attributes support this predicate. | |
82cc1f9a | 357 | .TP 5 |
6b13fa61 | 358 | \fBWITH\-HOSTNAME "\fIliteral string\fB"\fR |
890a10b7 | 359 | .TP 5 |
6b13fa61 | 360 | \fBWITH\-HOSTNAME "/\fIregular expression\fB/"\fR |
890a10b7 MS |
361 | Requires that at least one URI value contains a matching hostname. |
362 | .TP 5 | |
6b13fa61 | 363 | \fBWITH\-RESOURCE "\fIliteral string\fB"\fR |
890a10b7 | 364 | .TP 5 |
6b13fa61 | 365 | \fBWITH\-RESOURCE "/\fIregular expression\fB/"\fR |
890a10b7 MS |
366 | Requires that at least one URI value contains a matching resource (including leading /). |
367 | .TP 5 | |
6b13fa61 | 368 | \fBWITH\-SCHEME "\fIliteral string\fB"\fR |
890a10b7 | 369 | .TP 5 |
6b13fa61 | 370 | \fBWITH\-SCHEME "/\fIregular expression\fB/"\fR |
890a10b7 MS |
371 | Requires that at least one URI value contains a matching scheme. |
372 | .TP 5 | |
6b13fa61 MS |
373 | \fBWITH\-VALUE "\fIliteral string\fB"\fR |
374 | Requires that at least one value of the \fBEXPECT\fR attribute matches the literal string. Comparisons are case-sensitive. | |
82cc1f9a | 375 | .TP 5 |
6b13fa61 | 376 | \fBWITH\-VALUE <\fInumber\fR |
82cc1f9a | 377 | .TP 5 |
6b13fa61 | 378 | \fBWITH\-VALUE =\fInumber\fR |
82cc1f9a | 379 | .TP 5 |
6b13fa61 | 380 | \fBWITH\-VALUE >\fInumber\fR |
82cc1f9a | 381 | .TP 5 |
6b13fa61 MS |
382 | \fBWITH\-VALUE \fInumber\fR[\fI,...,number\fR] |
383 | 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. | |
82cc1f9a | 384 | .TP 5 |
6b13fa61 | 385 | \fBWITH\-VALUE "false"\fR |
82cc1f9a | 386 | .TP 5 |
6b13fa61 MS |
387 | \fBWITH\-VALUE "true"\fR |
388 | Requires that at least one value of the \fBEXPECT\fR attribute matches the boolean value given. | |
f8b3a85b | 389 | .TP 5 |
6b13fa61 MS |
390 | \fBWITH\-VALUE "/\fIregular expression\fB/"\fR |
391 | 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. | |
a21c36fa MS |
392 | .TP 5 |
393 | \fBWITH\-VALUE\-FROM \fIattribute-name\fR | |
394 | Requires that the value(s) of the \fBEXPECT\fR attribute matches the value(s) in the specified attribute. | |
395 | 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. | |
6b13fa61 MS |
396 | .SS STATUS PREDICATES |
397 | The following predicates are understood following the \fBSTATUS\fR test directive: | |
f8b3a85b | 398 | .TP 5 |
6b13fa61 MS |
399 | \fBDEFINE\-MATCH \fIvariable-name\fR |
400 | 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. | |
0fa6c7fa | 401 | .TP 5 |
6b13fa61 MS |
402 | \fBDEFINE\-NO\-MATCH \fIvariable-name\fR |
403 | 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. | |
0fa6c7fa | 404 | .TP 5 |
6b13fa61 MS |
405 | \fBIF\-DEFINED \fIvariable-name\fR |
406 | Makes the \fBSTATUS\fR apply only if the specified variable is defined. | |
f8b3a85b | 407 | .TP 5 |
6b13fa61 MS |
408 | \fBIF\-NOT\-DEFINED \fIvariable-name\fR |
409 | Makes the \fBSTATUS\fR apply only if the specified variable is not defined. | |
83e08001 | 410 | .TP 5 |
6b13fa61 | 411 | \fBREPEAT\-LIMIT \fInumber\fR |
a29fd7dd MS |
412 | .br |
413 | Specifies the maximum number of times to repeat. The default value is 1000. | |
414 | .TP 5 | |
6b13fa61 | 415 | \fBREPEAT\-MATCH\fR |
83e08001 | 416 | .TP 5 |
6b13fa61 MS |
417 | \fBREPEAT\-NO\-MATCH\fR |
418 | 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. | |
419 | .SS OPERATION CODES | |
2a75f21b | 420 | 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 |
6b13fa61 | 421 | .BR ipptool (8): |
f8b3a85b | 422 | .nf |
f8b3a85b | 423 | |
6b13fa61 MS |
424 | Activate\-Printer |
425 | CUPS\-Accept\-Jobs | |
426 | CUPS\-Add\-Modify\-Class | |
427 | CUPS\-Add\-Modify\-Printer | |
428 | CUPS\-Authenticate\-Job | |
429 | CUPS\-Delete\-Class | |
430 | CUPS\-Delete\-Printer | |
431 | CUPS\-Get\-Classes | |
432 | CUPS\-Get\-Default | |
433 | CUPS\-Get\-Devices | |
434 | CUPS\-Get\-Document | |
435 | CUPS\-Get\-PPD | |
436 | CUPS\-Get\-PPDs | |
437 | CUPS\-Get\-Printers | |
438 | CUPS\-Move\-Job | |
439 | CUPS\-Reject\-Jobs | |
440 | CUPS\-Set\-Default | |
441 | Cancel\-Current\-Job | |
442 | Cancel\-Job | |
443 | Cancel\-Jobs | |
444 | Cancel\-My\-Jobs | |
445 | Cancel\-Subscription | |
446 | Close\-Job | |
447 | Create\-Job | |
448 | Create\-Job\-Subscriptions | |
449 | Create\-Printer\-Subscriptions | |
450 | Deactivate\-Printer | |
451 | Disable\-Printer | |
452 | Enable\-Printer | |
453 | Get\-Job\-Attributes | |
454 | Get\-Jobs | |
455 | Get\-Notifications | |
456 | Get\-Printer\-Attributes | |
457 | Get\-Printer\-Support\-Files | |
458 | Get\-Printer\-Supported\-Values | |
459 | Get\-Subscription\-Attributes | |
460 | Get\-Subscriptions | |
461 | Hold\-Job | |
462 | Hold\-New\-Jobs | |
463 | Identify\-Printer | |
464 | Pause\-Printer | |
465 | Pause\-Printer\-After\-Current\-Job | |
466 | Print\-Job | |
467 | Print\-URI | |
468 | Promote\-Job | |
469 | Purge\-Jobs | |
470 | Release\-Held\-New\-Jobs | |
471 | Release\-Job | |
472 | Renew\-Subscription | |
473 | Reprocess\-Job | |
474 | Restart\-Job | |
475 | Restart\-Printer | |
476 | Resubmit\-Job | |
477 | Resume\-Job | |
478 | Resume\-Printer | |
479 | Schedule\-Job\-After | |
480 | Send\-Document | |
481 | Send\-Hardcopy\-Document | |
482 | Send\-Notifications | |
483 | Send\-URI | |
484 | Set\-Job\-Attributes | |
485 | Set\-Printer\-Attributes | |
486 | Shutdown\-Printer | |
487 | Startup\-Printer | |
488 | Suspend\-Current\-Job | |
489 | Validate\-Document | |
490 | Validate\-Job | |
f8b3a85b | 491 | .fi |
6b13fa61 | 492 | .SS STATUS CODES |
2a75f21b | 493 | 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 |
6b13fa61 MS |
494 | .BR ipptool (8): |
495 | .nf | |
f8b3a85b | 496 | |
6b13fa61 MS |
497 | client\-error\-account\-authorization\-failed |
498 | client\-error\-account\-closed | |
499 | client\-error\-account\-info\-needed | |
500 | client\-error\-account\-limit\-reached | |
501 | client\-error\-attributes\-not\-settable | |
502 | client\-error\-attributes\-or\-values\-not\-supported | |
503 | client\-error\-bad\-request | |
504 | client\-error\-charset\-not\-supported | |
505 | client\-error\-compression\-error | |
506 | client\-error\-compression\-not\-supported | |
507 | client\-error\-conflicting\-attributes | |
508 | client\-error\-document\-access\-error | |
509 | client\-error\-document\-format\-error | |
510 | client\-error\-document\-format\-not\-supported | |
511 | client\-error\-document\-password\-error | |
512 | client\-error\-document\-permission\-error | |
513 | client\-error\-document\-security\-error | |
514 | client\-error\-document\-unprintable\-error | |
515 | client\-error\-forbidden | |
516 | client\-error\-gone | |
517 | client\-error\-ignored\-all\-notifications | |
518 | client\-error\-ignored\-all\-subscriptions | |
519 | client\-error\-not\-authenticated | |
520 | client\-error\-not\-authorized | |
521 | client\-error\-not\-found | |
522 | client\-error\-not\-possible | |
523 | client\-error\-print\-support\-file\-not\-found | |
524 | client\-error\-request\-entity\-too\-large | |
525 | client\-error\-request\-value\-too\-long | |
526 | client\-error\-timeout | |
527 | client\-error\-too\-many\-subscriptions | |
528 | client\-error\-uri\-scheme\-not\-supported | |
529 | cups\-error\-account\-authorization\-failed | |
530 | cups\-error\-account\-closed | |
531 | cups\-error\-account\-info\-needed | |
532 | cups\-error\-account\-limit\-reached | |
533 | cups\-see\-other | |
534 | redirection\-other\-site | |
535 | server\-error\-busy | |
536 | server\-error\-device\-error | |
537 | server\-error\-internal\-error | |
538 | server\-error\-job\-canceled | |
539 | server\-error\-multiple\-document\-jobs\-not\-supported | |
540 | server\-error\-not\-accepting\-jobs | |
541 | server\-error\-operation\-not\-supported | |
542 | server\-error\-printer\-is\-deactivated | |
543 | server\-error\-service\-unavailable | |
544 | server\-error\-temporary\-error | |
545 | server\-error\-version\-not\-supported | |
546 | successful\-ok | |
547 | successful\-ok\-but\-cancel\-subscription | |
548 | successful\-ok\-conflicting\-attributes | |
549 | successful\-ok\-events\-complete | |
550 | successful\-ok\-ignored\-notifications | |
551 | successful\-ok\-ignored\-or\-substituted\-attributes | |
552 | successful\-ok\-ignored\-subscriptions | |
553 | successful\-ok\-too\-many\-events | |
554 | .fi | |
555 | .SS TAGS | |
2a75f21b | 556 | Value and group tags correspond to the names from RFC 8011 and other IPP extension specifications. Here are the group tags: |
f8b3a85b | 557 | .nf |
6b13fa61 MS |
558 | |
559 | document\-attributes\-tag | |
560 | event\-notification\-attributes\-tag | |
561 | job\-attributes\-tag | |
562 | operation\-attributes\-tag | |
563 | printer\-attributes\-tag | |
564 | subscription\-attributes\-tag | |
565 | unsupported\-attributes\-tag | |
f8b3a85b MS |
566 | .fi |
567 | .LP | |
568 | Here are the value tags: | |
569 | .nf | |
6b13fa61 MS |
570 | |
571 | admin\-define | |
f8b3a85b MS |
572 | boolean |
573 | charset | |
574 | collection | |
575 | dateTime | |
576 | default | |
6b13fa61 | 577 | delete\-attribute |
f8b3a85b MS |
578 | enum |
579 | integer | |
580 | keyword | |
581 | mimeMediaType | |
582 | nameWithLanguage | |
583 | nameWithoutLanguage | |
584 | naturalLanguage | |
6b13fa61 MS |
585 | no\-value |
586 | not\-settable | |
f8b3a85b MS |
587 | octetString |
588 | rangeOfInteger | |
589 | resolution | |
590 | textWithLanguage | |
591 | textWithoutLanguage | |
592 | unknown | |
593 | unsupported | |
594 | uri | |
595 | uriScheme | |
596 | .fi | |
6b13fa61 MS |
597 | .SS VARIABLES |
598 | The | |
599 | .BR ipptool (8) | |
600 | 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: | |
f8b3a85b | 601 | .TP 5 |
6b13fa61 | 602 | \fB$$\fR |
f8b3a85b MS |
603 | Inserts a single "$" character. |
604 | .TP 5 | |
6b13fa61 MS |
605 | \fB$ENV[\fIname\fB]\fR |
606 | Inserts the value of the named environment variable, or an empty string if the environment variable is not defined. | |
f8b3a85b | 607 | .TP 5 |
c8d7d4bf MS |
608 | \fB$date-current\fR |
609 | Inserts the current date and time using the ISO-8601 format ("yyyy-mm-ddThh:mm:ssZ"). | |
610 | .TP 5 | |
611 | \fB$date-start\fR | |
612 | Inserts the starting date and time using the ISO-8601 format ("yyyy-mm-ddThh:mm:ssZ"). | |
613 | .TP 5 | |
6b13fa61 MS |
614 | \fB$filename\fR |
615 | Inserts the filename provided to | |
616 | .BR ipptool (8) | |
617 | with the \fI-f\fR option. | |
f8b3a85b | 618 | .TP 5 |
6b13fa61 MS |
619 | \fB$filetype\fR |
620 | Inserts the MIME media type for the filename provided to | |
621 | .BR ipptool (8) | |
622 | with the \fI-f\fR option. | |
f8b3a85b | 623 | .TP 5 |
6b13fa61 MS |
624 | \fB$hostname\fR |
625 | Inserts the hostname from the URI provided to | |
626 | .BR ipptool (8). | |
f8b3a85b | 627 | .TP 5 |
6b13fa61 MS |
628 | \fB$job\-id\fR |
629 | Inserts the last "job\-id" attribute value returned in a test response or 0 if no "job\-id" attribute has been seen. | |
f8b3a85b | 630 | .TP 5 |
6b13fa61 MS |
631 | \fB$job\-uri\fR |
632 | Inserts the last "job\-uri" attribute value returned in a test response or an empty string if no "job\-uri" attribute has been seen. | |
f8b3a85b | 633 | .TP 5 |
6b13fa61 MS |
634 | \fB$notify\-subscription\-id\fR |
635 | Inserts the last "notify\-subscription\-id" attribute value returned in a test response or 0 if no "notify\-subscription\-id" attribute has been seen. | |
f8b3a85b | 636 | .TP 5 |
6b13fa61 MS |
637 | \fB$port\fR |
638 | Inserts the port number from the URI provided to | |
639 | .BR ipptool (8). | |
f8b3a85b | 640 | .TP 5 |
6b13fa61 MS |
641 | \fB$resource\fR |
642 | Inserts the resource path from the URI provided to | |
643 | .BR ipptool (8). | |
f8b3a85b | 644 | .TP 5 |
6b13fa61 MS |
645 | \fB$scheme\fR |
646 | Inserts the scheme from the URI provided to | |
647 | .BR ipptool (8). | |
f8b3a85b | 648 | .TP 5 |
6b13fa61 MS |
649 | \fB$uri\fR |
650 | Inserts the URI provided to | |
651 | .BR ipptool (8). | |
f8b3a85b | 652 | .TP 5 |
6b13fa61 MS |
653 | \fB$uriuser\fR |
654 | Inserts the username from the URI provided to | |
655 | .BR ipptool (8), | |
656 | if any. | |
657 | .TP 5 | |
658 | \fB$user\fR | |
659 | Inserts the current user's login name. | |
f8b3a85b | 660 | .SH SEE ALSO |
6b13fa61 | 661 | .BR ipptool (1), |
6b13fa61 MS |
662 | IANA IPP Registry (http://www.iana.org/assignments/ipp-registrations), |
663 | PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp), | |
f1dd3a39 | 664 | RFC 8011 (http://tools.ietf.org/html/rfc8011) |
f8b3a85b | 665 | .SH COPYRIGHT |
064e50fb | 666 | Copyright \[co] 2007-2021 by Apple Inc. |