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