]>
Commit | Line | Data |
---|---|---|
f8b3a85b | 1 | .\" |
f1dd3a39 | 2 | .\" ipptoolfile man page. |
f8b3a85b | 3 | .\" |
87030afb | 4 | .\" Copyright © 2010-2019 by Apple Inc. |
f8b3a85b | 5 | .\" |
87030afb MS |
6 | .\" Licensed under Apache License v2.0. See the file "LICENSE" for more |
7 | .\" information. | |
f8b3a85b | 8 | .\" |
c8d7d4bf | 9 | .TH ipptoolfile 5 "CUPS" "13 May 2019" "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 MS |
168 | Out-of-band tags (admin-define, delete-attribute, no-value, not-settable, unknown, unsupported) have no value. |
169 | Values for other tags are separated 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 |
6b13fa61 | 217 | \fBNAME "\fIliteral string\fB"\fR |
f8b3a85b MS |
218 | Specifies the human-readable name of the test. |
219 | .TP 5 | |
6b13fa61 | 220 | \fBOPERATION \fIoperation-code\fR |
f8b3a85b MS |
221 | Specifies the operation to be performed. |
222 | .TP 5 | |
9fcdd250 MS |
223 | \fBPAUSE "\fImessage\fB"\fR |
224 | Displays the provided message and waits for the user to press a key to continue. | |
225 | .TP 5 | |
6b13fa61 | 226 | \fBREQUEST\-ID \fInumber\fR\fR |
f8b3a85b | 227 | .TP 5 |
6b13fa61 MS |
228 | \fBREQUEST\-ID random\fR |
229 | 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 | 230 | .TP 5 |
6b13fa61 MS |
231 | \fBRESOURCE \fIpath\fR |
232 | Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the | |
233 | .BR ipptool (8) | |
234 | program. | |
f8b3a85b | 235 | .TP 5 |
6b13fa61 | 236 | \fBSKIP\-IF\-DEFINED \fIvariable-name\fR |
030ae6a1 | 237 | .TP 5 |
6b13fa61 MS |
238 | \fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR |
239 | Specifies that the current test should be skipped when the variable is or is not defined. | |
030ae6a1 | 240 | .TP 5 |
6b13fa61 | 241 | \fBSKIP\-PREVIOUS\-ERROR yes\fR |
030ae6a1 | 242 | .TP 5 |
6b13fa61 MS |
243 | \fBSKIP\-PREVIOUS\-ERROR no\fR |
244 | Specifies whether | |
245 | .BR ipptool (8) | |
246 | will skip the current test if the previous test resulted in an error/failure. | |
030ae6a1 | 247 | .TP 5 |
6b13fa61 MS |
248 | \fBSTATUS \fIstatus-code \fR[ \fIpredicate\fR ] |
249 | 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 | 250 | .TP 5 |
6b13fa61 | 251 | \fBTEST\-ID "\fIidentifier\fR" |
1d47b929 MS |
252 | Specifies an identifier string for the current test. |
253 | .TP 5 | |
6b13fa61 MS |
254 | \fBTRANSFER auto\fR |
255 | Specifies that this test will use "Transfer-Encoding: chunked" if it has an attached file or "Content-Length:" otherwise. | |
f8b3a85b | 256 | .TP 5 |
6b13fa61 MS |
257 | \fBTRANSFER chunked\fR |
258 | Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" header. | |
f8b3a85b | 259 | .TP 5 |
6b13fa61 | 260 | \fBTRANSFER length\fR |
f8b3a85b MS |
261 | Specifies that this test will use the HTTP/1.0 "Content-Length:" header. |
262 | .TP 5 | |
6b13fa61 | 263 | \fBVERSION 1.0\fR |
f8b3a85b | 264 | .TP 5 |
6b13fa61 | 265 | \fBVERSION 1.1\fR |
f8b3a85b | 266 | .TP 5 |
6b13fa61 | 267 | \fBVERSION 2.0\fR |
f8b3a85b | 268 | .TP 5 |
6b13fa61 | 269 | \fBVERSION 2.1\fR |
f8b3a85b | 270 | .TP 5 |
6b13fa61 | 271 | \fBVERSION 2.2\fR |
f8b3a85b | 272 | Specifies the IPP version number to use for this test. |
6b13fa61 MS |
273 | .SS EXPECT PREDICATES |
274 | The following predicates are understood following the \fBEXPECT\fR test directive: | |
f8b3a85b | 275 | .TP 5 |
6b13fa61 MS |
276 | \fBCOUNT \fInumber\fR |
277 | Requires the \fBEXPECT\fR attribute to have the specified number of values. | |
f8b3a85b | 278 | .TP 5 |
6b13fa61 MS |
279 | \fBDEFINE\-MATCH \fIvariable-name\fR |
280 | 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 | 281 | .TP 5 |
6b13fa61 MS |
282 | \fBDEFINE\-NO\-MATCH \fIvariable-name\fR |
283 | 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 | 284 | .TP 5 |
6b13fa61 MS |
285 | \fBDEFINE\-VALUE \fIvariable-name\fR |
286 | 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 | 287 | .TP 5 |
6b13fa61 MS |
288 | \fBIF\-DEFINED \fIvariable-name\fR |
289 | Makes the \fBEXPECT\fR conditions apply only if the specified variable is defined. | |
f8b3a85b | 290 | .TP 5 |
6b13fa61 MS |
291 | \fBIF\-NOT\-DEFINED \fIvariable-name\fR |
292 | Makes the \fBEXPECT\fR conditions apply only if the specified variable is not defined. | |
f8b3a85b | 293 | .TP 5 |
6b13fa61 MS |
294 | \fBIN\-GROUP \fItag\fR |
295 | Requires the \fBEXPECT\fR attribute to be in the specified group tag. | |
f8b3a85b | 296 | .TP 5 |
6b13fa61 MS |
297 | \fBOF\-TYPE \fItag[,tag,...]\fR |
298 | Requires the \fBEXPECT\fR attribute to use one of the specified value tag(s). | |
f8b3a85b | 299 | .TP 5 |
6b13fa61 | 300 | \fBREPEAT\-LIMIT \fInumber\fR |
a29fd7dd | 301 | .br |
6b13fa61 | 302 | 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 | 303 | .TP 5 |
6b13fa61 | 304 | \fBREPEAT\-MATCH\fR |
83e08001 | 305 | .TP 5 |
6b13fa61 MS |
306 | \fBREPEAT\-NO\-MATCH\fR |
307 | Specifies that the current test should be repeated when the \fBEXPECT\fR condition matches or does not match. | |
83e08001 | 308 | .TP 5 |
6b13fa61 MS |
309 | \fBSAME\-COUNT\-AS \fIattribute-name\fR |
310 | Requires the \fBEXPECT\fR attribute to have the same number of values as the specified parallel attribute. | |
f8b3a85b | 311 | .TP 5 |
6b13fa61 | 312 | \fBWITH\-ALL\-HOSTNAMES "\fIliteral string\fB"\fR |
890a10b7 | 313 | .TP 5 |
6b13fa61 | 314 | \fBWITH\-ALL\-HOSTNAMES "/\fIregular expression\fB/"\fR |
890a10b7 MS |
315 | Requires that all URI values contain a matching hostname. |
316 | .TP 5 | |
6b13fa61 | 317 | \fBWITH\-ALL\-RESOURCES "\fIliteral string\fB"\fR |
890a10b7 | 318 | .TP 5 |
6b13fa61 | 319 | \fBWITH\-ALL\-RESOURCES "/\fIregular expression\fB/"\fR |
890a10b7 MS |
320 | Requires that all URI values contain a matching resource (including leading /). |
321 | .TP 5 | |
6b13fa61 | 322 | \fBWITH\-ALL\-SCHEMES "\fIliteral string\fB"\fR |
890a10b7 | 323 | .TP 5 |
6b13fa61 | 324 | \fBWITH\-ALL-SCHEMES "/\fIregular expression\fB/"\fR |
890a10b7 MS |
325 | Requires that all URI values contain a matching scheme. |
326 | .TP 5 | |
6b13fa61 MS |
327 | \fBWITH\-ALL\-VALUES "\fIliteral string\fB"\fR |
328 | Requires that all values of the \fBEXPECT\fR attribute match the literal string. Comparisons are case-sensitive. | |
82cc1f9a | 329 | .TP 5 |
6b13fa61 | 330 | \fBWITH\-ALL\-VALUES <\fInumber\fR |
82cc1f9a | 331 | .TP 5 |
6b13fa61 | 332 | \fBWITH\-ALL\-VALUES =\fInumber\fR |
82cc1f9a | 333 | .TP 5 |
6b13fa61 | 334 | \fBWITH\-ALL\-VALUES >\fInumber\fR |
82cc1f9a | 335 | .TP 5 |
6b13fa61 MS |
336 | \fBWITH\-ALL\-VALUES \fInumber\fR[\fI,...,number\fR] |
337 | 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 | 338 | .TP 5 |
6b13fa61 | 339 | \fBWITH\-ALL\-VALUES "false"\fR |
82cc1f9a | 340 | .TP 5 |
6b13fa61 MS |
341 | \fBWITH\-ALL\-VALUES "true"\fR |
342 | Requires that all values of the \fBEXPECT\fR attribute match the boolean value given. | |
82cc1f9a | 343 | .TP 5 |
6b13fa61 MS |
344 | \fBWITH\-ALL\-VALUES "/\fIregular expression\fB/"\fR |
345 | 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 | 346 | .TP 5 |
6b13fa61 | 347 | \fBWITH\-HOSTNAME "\fIliteral string\fB"\fR |
890a10b7 | 348 | .TP 5 |
6b13fa61 | 349 | \fBWITH\-HOSTNAME "/\fIregular expression\fB/"\fR |
890a10b7 MS |
350 | Requires that at least one URI value contains a matching hostname. |
351 | .TP 5 | |
6b13fa61 | 352 | \fBWITH\-RESOURCE "\fIliteral string\fB"\fR |
890a10b7 | 353 | .TP 5 |
6b13fa61 | 354 | \fBWITH\-RESOURCE "/\fIregular expression\fB/"\fR |
890a10b7 MS |
355 | Requires that at least one URI value contains a matching resource (including leading /). |
356 | .TP 5 | |
6b13fa61 | 357 | \fBWITH\-SCHEME "\fIliteral string\fB"\fR |
890a10b7 | 358 | .TP 5 |
6b13fa61 | 359 | \fBWITH\-SCHEME "/\fIregular expression\fB/"\fR |
890a10b7 MS |
360 | Requires that at least one URI value contains a matching scheme. |
361 | .TP 5 | |
6b13fa61 MS |
362 | \fBWITH\-VALUE "\fIliteral string\fB"\fR |
363 | Requires that at least one value of the \fBEXPECT\fR attribute matches the literal string. Comparisons are case-sensitive. | |
82cc1f9a | 364 | .TP 5 |
6b13fa61 | 365 | \fBWITH\-VALUE <\fInumber\fR |
82cc1f9a | 366 | .TP 5 |
6b13fa61 | 367 | \fBWITH\-VALUE =\fInumber\fR |
82cc1f9a | 368 | .TP 5 |
6b13fa61 | 369 | \fBWITH\-VALUE >\fInumber\fR |
82cc1f9a | 370 | .TP 5 |
6b13fa61 MS |
371 | \fBWITH\-VALUE \fInumber\fR[\fI,...,number\fR] |
372 | 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 | 373 | .TP 5 |
6b13fa61 | 374 | \fBWITH\-VALUE "false"\fR |
82cc1f9a | 375 | .TP 5 |
6b13fa61 MS |
376 | \fBWITH\-VALUE "true"\fR |
377 | Requires that at least one value of the \fBEXPECT\fR attribute matches the boolean value given. | |
f8b3a85b | 378 | .TP 5 |
6b13fa61 MS |
379 | \fBWITH\-VALUE "/\fIregular expression\fB/"\fR |
380 | 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 |
381 | .TP 5 |
382 | \fBWITH\-VALUE\-FROM \fIattribute-name\fR | |
383 | Requires that the value(s) of the \fBEXPECT\fR attribute matches the value(s) in the specified attribute. | |
384 | 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 |
385 | .SS STATUS PREDICATES |
386 | The following predicates are understood following the \fBSTATUS\fR test directive: | |
f8b3a85b | 387 | .TP 5 |
6b13fa61 MS |
388 | \fBDEFINE\-MATCH \fIvariable-name\fR |
389 | 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 | 390 | .TP 5 |
6b13fa61 MS |
391 | \fBDEFINE\-NO\-MATCH \fIvariable-name\fR |
392 | 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 | 393 | .TP 5 |
6b13fa61 MS |
394 | \fBIF\-DEFINED \fIvariable-name\fR |
395 | Makes the \fBSTATUS\fR apply only if the specified variable is defined. | |
f8b3a85b | 396 | .TP 5 |
6b13fa61 MS |
397 | \fBIF\-NOT\-DEFINED \fIvariable-name\fR |
398 | Makes the \fBSTATUS\fR apply only if the specified variable is not defined. | |
83e08001 | 399 | .TP 5 |
6b13fa61 | 400 | \fBREPEAT\-LIMIT \fInumber\fR |
a29fd7dd MS |
401 | .br |
402 | Specifies the maximum number of times to repeat. The default value is 1000. | |
403 | .TP 5 | |
6b13fa61 | 404 | \fBREPEAT\-MATCH\fR |
83e08001 | 405 | .TP 5 |
6b13fa61 MS |
406 | \fBREPEAT\-NO\-MATCH\fR |
407 | 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. | |
408 | .SS OPERATION CODES | |
2a75f21b | 409 | 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 | 410 | .BR ipptool (8): |
f8b3a85b | 411 | .nf |
f8b3a85b | 412 | |
6b13fa61 MS |
413 | Activate\-Printer |
414 | CUPS\-Accept\-Jobs | |
415 | CUPS\-Add\-Modify\-Class | |
416 | CUPS\-Add\-Modify\-Printer | |
417 | CUPS\-Authenticate\-Job | |
418 | CUPS\-Delete\-Class | |
419 | CUPS\-Delete\-Printer | |
420 | CUPS\-Get\-Classes | |
421 | CUPS\-Get\-Default | |
422 | CUPS\-Get\-Devices | |
423 | CUPS\-Get\-Document | |
424 | CUPS\-Get\-PPD | |
425 | CUPS\-Get\-PPDs | |
426 | CUPS\-Get\-Printers | |
427 | CUPS\-Move\-Job | |
428 | CUPS\-Reject\-Jobs | |
429 | CUPS\-Set\-Default | |
430 | Cancel\-Current\-Job | |
431 | Cancel\-Job | |
432 | Cancel\-Jobs | |
433 | Cancel\-My\-Jobs | |
434 | Cancel\-Subscription | |
435 | Close\-Job | |
436 | Create\-Job | |
437 | Create\-Job\-Subscriptions | |
438 | Create\-Printer\-Subscriptions | |
439 | Deactivate\-Printer | |
440 | Disable\-Printer | |
441 | Enable\-Printer | |
442 | Get\-Job\-Attributes | |
443 | Get\-Jobs | |
444 | Get\-Notifications | |
445 | Get\-Printer\-Attributes | |
446 | Get\-Printer\-Support\-Files | |
447 | Get\-Printer\-Supported\-Values | |
448 | Get\-Subscription\-Attributes | |
449 | Get\-Subscriptions | |
450 | Hold\-Job | |
451 | Hold\-New\-Jobs | |
452 | Identify\-Printer | |
453 | Pause\-Printer | |
454 | Pause\-Printer\-After\-Current\-Job | |
455 | Print\-Job | |
456 | Print\-URI | |
457 | Promote\-Job | |
458 | Purge\-Jobs | |
459 | Release\-Held\-New\-Jobs | |
460 | Release\-Job | |
461 | Renew\-Subscription | |
462 | Reprocess\-Job | |
463 | Restart\-Job | |
464 | Restart\-Printer | |
465 | Resubmit\-Job | |
466 | Resume\-Job | |
467 | Resume\-Printer | |
468 | Schedule\-Job\-After | |
469 | Send\-Document | |
470 | Send\-Hardcopy\-Document | |
471 | Send\-Notifications | |
472 | Send\-URI | |
473 | Set\-Job\-Attributes | |
474 | Set\-Printer\-Attributes | |
475 | Shutdown\-Printer | |
476 | Startup\-Printer | |
477 | Suspend\-Current\-Job | |
478 | Validate\-Document | |
479 | Validate\-Job | |
f8b3a85b | 480 | .fi |
6b13fa61 | 481 | .SS STATUS CODES |
2a75f21b | 482 | 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 |
483 | .BR ipptool (8): |
484 | .nf | |
f8b3a85b | 485 | |
6b13fa61 MS |
486 | client\-error\-account\-authorization\-failed |
487 | client\-error\-account\-closed | |
488 | client\-error\-account\-info\-needed | |
489 | client\-error\-account\-limit\-reached | |
490 | client\-error\-attributes\-not\-settable | |
491 | client\-error\-attributes\-or\-values\-not\-supported | |
492 | client\-error\-bad\-request | |
493 | client\-error\-charset\-not\-supported | |
494 | client\-error\-compression\-error | |
495 | client\-error\-compression\-not\-supported | |
496 | client\-error\-conflicting\-attributes | |
497 | client\-error\-document\-access\-error | |
498 | client\-error\-document\-format\-error | |
499 | client\-error\-document\-format\-not\-supported | |
500 | client\-error\-document\-password\-error | |
501 | client\-error\-document\-permission\-error | |
502 | client\-error\-document\-security\-error | |
503 | client\-error\-document\-unprintable\-error | |
504 | client\-error\-forbidden | |
505 | client\-error\-gone | |
506 | client\-error\-ignored\-all\-notifications | |
507 | client\-error\-ignored\-all\-subscriptions | |
508 | client\-error\-not\-authenticated | |
509 | client\-error\-not\-authorized | |
510 | client\-error\-not\-found | |
511 | client\-error\-not\-possible | |
512 | client\-error\-print\-support\-file\-not\-found | |
513 | client\-error\-request\-entity\-too\-large | |
514 | client\-error\-request\-value\-too\-long | |
515 | client\-error\-timeout | |
516 | client\-error\-too\-many\-subscriptions | |
517 | client\-error\-uri\-scheme\-not\-supported | |
518 | cups\-error\-account\-authorization\-failed | |
519 | cups\-error\-account\-closed | |
520 | cups\-error\-account\-info\-needed | |
521 | cups\-error\-account\-limit\-reached | |
522 | cups\-see\-other | |
523 | redirection\-other\-site | |
524 | server\-error\-busy | |
525 | server\-error\-device\-error | |
526 | server\-error\-internal\-error | |
527 | server\-error\-job\-canceled | |
528 | server\-error\-multiple\-document\-jobs\-not\-supported | |
529 | server\-error\-not\-accepting\-jobs | |
530 | server\-error\-operation\-not\-supported | |
531 | server\-error\-printer\-is\-deactivated | |
532 | server\-error\-service\-unavailable | |
533 | server\-error\-temporary\-error | |
534 | server\-error\-version\-not\-supported | |
535 | successful\-ok | |
536 | successful\-ok\-but\-cancel\-subscription | |
537 | successful\-ok\-conflicting\-attributes | |
538 | successful\-ok\-events\-complete | |
539 | successful\-ok\-ignored\-notifications | |
540 | successful\-ok\-ignored\-or\-substituted\-attributes | |
541 | successful\-ok\-ignored\-subscriptions | |
542 | successful\-ok\-too\-many\-events | |
543 | .fi | |
544 | .SS TAGS | |
2a75f21b | 545 | Value and group tags correspond to the names from RFC 8011 and other IPP extension specifications. Here are the group tags: |
f8b3a85b | 546 | .nf |
6b13fa61 MS |
547 | |
548 | document\-attributes\-tag | |
549 | event\-notification\-attributes\-tag | |
550 | job\-attributes\-tag | |
551 | operation\-attributes\-tag | |
552 | printer\-attributes\-tag | |
553 | subscription\-attributes\-tag | |
554 | unsupported\-attributes\-tag | |
f8b3a85b MS |
555 | .fi |
556 | .LP | |
557 | Here are the value tags: | |
558 | .nf | |
6b13fa61 MS |
559 | |
560 | admin\-define | |
f8b3a85b MS |
561 | boolean |
562 | charset | |
563 | collection | |
564 | dateTime | |
565 | default | |
6b13fa61 | 566 | delete\-attribute |
f8b3a85b MS |
567 | enum |
568 | integer | |
569 | keyword | |
570 | mimeMediaType | |
571 | nameWithLanguage | |
572 | nameWithoutLanguage | |
573 | naturalLanguage | |
6b13fa61 MS |
574 | no\-value |
575 | not\-settable | |
f8b3a85b MS |
576 | octetString |
577 | rangeOfInteger | |
578 | resolution | |
579 | textWithLanguage | |
580 | textWithoutLanguage | |
581 | unknown | |
582 | unsupported | |
583 | uri | |
584 | uriScheme | |
585 | .fi | |
6b13fa61 MS |
586 | .SS VARIABLES |
587 | The | |
588 | .BR ipptool (8) | |
589 | 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 | 590 | .TP 5 |
6b13fa61 | 591 | \fB$$\fR |
f8b3a85b MS |
592 | Inserts a single "$" character. |
593 | .TP 5 | |
6b13fa61 MS |
594 | \fB$ENV[\fIname\fB]\fR |
595 | Inserts the value of the named environment variable, or an empty string if the environment variable is not defined. | |
f8b3a85b | 596 | .TP 5 |
c8d7d4bf MS |
597 | \fB$date-current\fR |
598 | Inserts the current date and time using the ISO-8601 format ("yyyy-mm-ddThh:mm:ssZ"). | |
599 | .TP 5 | |
600 | \fB$date-start\fR | |
601 | Inserts the starting date and time using the ISO-8601 format ("yyyy-mm-ddThh:mm:ssZ"). | |
602 | .TP 5 | |
6b13fa61 MS |
603 | \fB$filename\fR |
604 | Inserts the filename provided to | |
605 | .BR ipptool (8) | |
606 | with the \fI-f\fR option. | |
f8b3a85b | 607 | .TP 5 |
6b13fa61 MS |
608 | \fB$filetype\fR |
609 | Inserts the MIME media type for the filename provided to | |
610 | .BR ipptool (8) | |
611 | with the \fI-f\fR option. | |
f8b3a85b | 612 | .TP 5 |
6b13fa61 MS |
613 | \fB$hostname\fR |
614 | Inserts the hostname from the URI provided to | |
615 | .BR ipptool (8). | |
f8b3a85b | 616 | .TP 5 |
6b13fa61 MS |
617 | \fB$job\-id\fR |
618 | Inserts the last "job\-id" attribute value returned in a test response or 0 if no "job\-id" attribute has been seen. | |
f8b3a85b | 619 | .TP 5 |
6b13fa61 MS |
620 | \fB$job\-uri\fR |
621 | 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 | 622 | .TP 5 |
6b13fa61 MS |
623 | \fB$notify\-subscription\-id\fR |
624 | 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 | 625 | .TP 5 |
6b13fa61 MS |
626 | \fB$port\fR |
627 | Inserts the port number from the URI provided to | |
628 | .BR ipptool (8). | |
f8b3a85b | 629 | .TP 5 |
6b13fa61 MS |
630 | \fB$resource\fR |
631 | Inserts the resource path from the URI provided to | |
632 | .BR ipptool (8). | |
f8b3a85b | 633 | .TP 5 |
6b13fa61 MS |
634 | \fB$scheme\fR |
635 | Inserts the scheme from the URI provided to | |
636 | .BR ipptool (8). | |
f8b3a85b | 637 | .TP 5 |
6b13fa61 MS |
638 | \fB$uri\fR |
639 | Inserts the URI provided to | |
640 | .BR ipptool (8). | |
f8b3a85b | 641 | .TP 5 |
6b13fa61 MS |
642 | \fB$uriuser\fR |
643 | Inserts the username from the URI provided to | |
644 | .BR ipptool (8), | |
645 | if any. | |
646 | .TP 5 | |
647 | \fB$user\fR | |
648 | Inserts the current user's login name. | |
f8b3a85b | 649 | .SH SEE ALSO |
6b13fa61 | 650 | .BR ipptool (1), |
6b13fa61 MS |
651 | IANA IPP Registry (http://www.iana.org/assignments/ipp-registrations), |
652 | PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp), | |
f1dd3a39 | 653 | RFC 8011 (http://tools.ietf.org/html/rfc8011) |
f8b3a85b | 654 | .SH COPYRIGHT |
87030afb | 655 | Copyright \[co] 2007-2019 by Apple Inc. |