]>
Commit | Line | Data |
---|---|---|
f8b3a85b MS |
1 | # |
2 | # "$Id$" | |
3 | # | |
4 | # IPP/1.1 test suite. | |
5 | # | |
6 | # Copyright 2007-2010 by Apple Inc. | |
7 | # Copyright 2001-2006 by Easy Software Products. All rights reserved. | |
8 | # | |
9 | # These coded instructions, statements, and computer programs are the | |
10 | # property of Apple Inc. and are protected by Federal copyright | |
11 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | # which should have been included with this file. If this file is | |
13 | # file is missing or damaged, see the license at "http://www.cups.org/". | |
14 | # | |
15 | # Usage: | |
16 | # | |
aaf19ab0 | 17 | # ./ipptool -f filename -t printer-uri ipp-1.1.test |
f8b3a85b MS |
18 | # |
19 | ||
20 | # Test that a request-id value of 0 is not accepted. | |
21 | # | |
22 | # Required by: RFC 2911 section 3.1.1 | |
23 | { | |
24 | NAME "3.1.1: Bad request-id value 0" | |
25 | REQUEST-ID 0 | |
26 | OPERATION Get-Printer-Attributes | |
27 | GROUP operation-attributes-tag | |
28 | ATTR charset attributes-charset utf-8 | |
29 | ATTR naturalLanguage attributes-natural-language en | |
30 | ATTR uri printer-uri $uri | |
31 | ||
32 | STATUS client-error-bad-request | |
33 | EXPECT !printer-uri-supported | |
34 | } | |
35 | ||
36 | ||
37 | # Test that the first two attributes must be attributes-charset and | |
38 | # attributes-natural-language. | |
39 | # | |
40 | # Required by: RFC 2911 section 3.1.4 | |
41 | { | |
42 | NAME "3.1.4: No Operation Attributes" | |
43 | REQUEST-ID random | |
44 | OPERATION Get-Printer-Attributes | |
45 | GROUP operation-attributes-tag | |
46 | ||
47 | STATUS client-error-bad-request | |
48 | EXPECT !printer-uri-supported | |
49 | } | |
50 | { | |
51 | NAME "3.1.4: attributes-charset" | |
52 | OPERATION Get-Printer-Attributes | |
53 | GROUP operation-attributes-tag | |
54 | ATTR charset attributes-charset utf-8 | |
55 | ATTR uri printer-uri $uri | |
56 | ||
57 | STATUS client-error-bad-request | |
58 | EXPECT !printer-uri-supported | |
59 | } | |
60 | { | |
61 | NAME "3.1.4: attributes-natural-language" | |
62 | OPERATION Get-Printer-Attributes | |
63 | GROUP operation-attributes-tag | |
64 | ATTR naturalLanguage attributes-natural-language en | |
65 | ATTR uri printer-uri $uri | |
66 | ||
67 | STATUS client-error-bad-request | |
68 | EXPECT !printer-uri-supported | |
69 | } | |
70 | { | |
71 | NAME "3.1.4: attributes-natural-language + attributes-charset" | |
72 | OPERATION Get-Printer-Attributes | |
73 | GROUP operation-attributes-tag | |
74 | ATTR naturalLanguage attributes-natural-language en | |
75 | ATTR charset attributes-charset utf-8 | |
76 | ATTR uri printer-uri $uri | |
77 | ||
78 | STATUS client-error-bad-request | |
79 | EXPECT !printer-uri-supported | |
80 | } | |
81 | { | |
82 | NAME "3.1.4: attributes-charset + attributes-natural-language" | |
83 | OPERATION Get-Printer-Attributes | |
84 | GROUP operation-attributes-tag | |
85 | ATTR charset attributes-charset utf-8 | |
86 | ATTR naturalLanguage attributes-natural-language en | |
87 | ATTR uri printer-uri $uri | |
88 | ||
89 | STATUS successful-ok | |
90 | EXPECT printer-uri-supported OF-TYPE uri | |
91 | } | |
92 | ||
93 | ||
94 | # Test that bad IPP versions are not supported. | |
95 | # | |
96 | # Required by: RFC 2911 section 3.1.8 | |
97 | { | |
98 | # The name of the test... | |
99 | NAME "3.1.8: Unsupported IPP version 0.0" | |
100 | VERSION 0.0 | |
101 | OPERATION Get-Printer-Attributes | |
cc754834 | 102 | GROUP operation-attributes-tag |
f8b3a85b MS |
103 | ATTR charset attributes-charset utf-8 |
104 | ATTR naturalLanguage attributes-natural-language en | |
105 | ATTR uri printer-uri $uri | |
106 | ||
107 | STATUS server-error-version-not-supported | |
108 | EXPECT !printer-uri-supported | |
109 | } | |
110 | ||
111 | ||
112 | # Test that printer operations require the printer-uri operation attribute. | |
113 | # | |
114 | # Required by: RFC 2911 section 3.2 | |
115 | { | |
116 | NAME "3.2: No printer-uri operation attribute" | |
117 | OPERATION Get-Printer-Attributes | |
118 | GROUP operation-attributes-tag | |
119 | ATTR charset attributes-charset utf-8 | |
120 | ATTR naturalLanguage attributes-natural-language en | |
121 | ||
122 | STATUS client-error-bad-request | |
123 | EXPECT !printer-uri-supported | |
124 | } | |
125 | ||
126 | ||
127 | # Test Print-Job operation | |
128 | # | |
129 | # Required by: RFC 2911 section 3.2.1 | |
130 | { | |
131 | NAME "3.2.1: Print-Job Operation" | |
132 | OPERATION Print-Job | |
133 | GROUP operation-attributes-tag | |
134 | ATTR charset attributes-charset utf-8 | |
135 | ATTR naturalLanguage attributes-natural-language en | |
136 | ATTR uri printer-uri $uri | |
137 | ATTR name requesting-user-name $user | |
138 | ATTR name job-name $filename | |
139 | ATTR boolean ipp-attribute-fidelity false | |
140 | ATTR name document-name $filename | |
141 | ATTR keyword compression none | |
142 | ATTR mimeMediaType document-format application/octet-stream | |
143 | FILE $filename | |
144 | ||
145 | STATUS successful-ok | |
146 | STATUS client-error-document-format-not-supported | |
147 | EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag | |
148 | EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag | |
149 | WITH-VALUE >0 | |
150 | EXPECT job-state OF-TYPE enum COUNT 1 IN-GROUP job-attributes-tag | |
151 | WITH-VALUE 3,4,5,6,7,8,9 | |
152 | EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag | |
153 | EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag | |
154 | EXPECT ?number-of-intervening-jobs OF-TYPE integer | |
155 | IN-GROUP job-attributes-tag WITH-VALUE >-1 | |
156 | } | |
157 | ||
158 | # Test Get-Printer-Attributes operation | |
159 | # | |
160 | # Required by: RFC 2911 section 3.2.5 | |
161 | { | |
162 | NAME "3.2.5: Get-Printer-Attributes Operation (default)" | |
163 | OPERATION Get-Printer-Attributes | |
164 | GROUP operation-attributes-tag | |
165 | ATTR charset attributes-charset utf-8 | |
166 | ATTR naturalLanguage attributes-natural-language en | |
167 | ATTR uri printer-uri $uri | |
168 | ATTR name requesting-user-name $user | |
169 | ATTR mimeMediaType document-format application/octet-stream | |
170 | ||
171 | STATUS successful-ok | |
172 | ||
173 | # Job template attributes | |
174 | EXPECT ?copies-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0 | |
175 | EXPECT ?copies-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag | |
176 | EXPECT ?finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag | |
177 | EXPECT ?finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3 | |
178 | EXPECT ?job-hold-until-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1 | |
179 | EXPECT ?job-hold-until-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE no-hold | |
180 | EXPECT ?job-priority-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0,<101 | |
181 | EXPECT ?job-priority-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0,<101 | |
182 | EXPECT ?job-sheets-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag | |
183 | EXPECT ?job-sheets-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE none | |
184 | EXPECT ?media-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1 | |
185 | EXPECT ?media-ready OF-TYPE keyword|name IN-GROUP printer-attributes-tag | |
186 | EXPECT ?media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag | |
187 | EXPECT ?multiple-document-handling-default OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(single-document|separate-documents-uncollated-copies|separate-documents-collated-copies|single-document-new-sheet)$$/" | |
188 | EXPECT ?multiple-document-handling-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(single-document|separate-documents-uncollated-copies|separate-documents-collated-copies|single-document-new-sheet)$$/" | |
189 | EXPECT ?number-up-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0 | |
190 | EXPECT ?number-up-supported OF-TYPE integer|rangeOfInteger IN-GROUP printer-attributes-tag WITH-VALUE >0 | |
191 | EXPECT ?number-up-supported WITH-VALUE 1 | |
192 | EXPECT ?orientation-requested-default OF-TYPE enum,no-value IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE no-value,3,4,5,6 | |
193 | EXPECT ?orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6 | |
194 | EXPECT ?pages-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag | |
195 | EXPECT ?print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5 | |
196 | EXPECT ?print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5 | |
197 | EXPECT ?printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1 | |
198 | EXPECT ?printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag | |
199 | EXPECT ?sides-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/" | |
200 | EXPECT ?sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/" | |
201 | ||
202 | # Printer description attributes | |
203 | EXPECT ?color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 | |
204 | EXPECT ?job-impressions-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1 | |
205 | EXPECT ?job-k-octets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1 | |
206 | EXPECT ?job-media-sheets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1 | |
207 | EXPECT ?multiple-document-jobs-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 | |
208 | EXPECT ?multiple-operation-time-out OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0 | |
209 | EXPECT ?pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 | |
210 | EXPECT ?pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 | |
211 | EXPECT ?printer-driver-installer OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 | |
212 | EXPECT ?printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/" | |
213 | EXPECT ?printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/" | |
214 | EXPECT ?printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/" | |
215 | EXPECT ?printer-message-from-operator OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/" | |
216 | EXPECT ?printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 | |
217 | EXPECT ?printer-more-info-manufacturer OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 | |
218 | EXPECT ?printer-state-message OF-TYPE text IN-GROUP printer-attributes-tag | |
219 | EXPECT ?reference-uri-schemes-supported OF-TYPE uriScheme IN-GROUP printer-attributes-tag | |
220 | EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag COUNT 1 | |
221 | EXPECT charset-supported OF-TYPE charset IN-GROUP printer-attributes-tag WITH-VALUE utf-8 | |
222 | EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE none | |
223 | EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag COUNT 1 | |
224 | EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag | |
225 | EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag | |
226 | EXPECT ipp-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE 1.1 | |
227 | EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1 | |
228 | EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0002 # Print-Job | |
229 | # Not requiring 0x0004 Validate-Job since it is deprecated | |
230 | EXPECT operations-supported WITH-VALUE 0x0008 # Cancel-Job | |
231 | EXPECT operations-supported WITH-VALUE 0x0009 # Get-Job-Attributes | |
232 | EXPECT operations-supported WITH-VALUE 0x000a # Get-Jobs | |
233 | EXPECT operations-supported WITH-VALUE 0x000b # Get-Printer-Attributes | |
234 | EXPECT pdl-override-supported OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 | |
235 | EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 | |
236 | EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{1,127}$$/" | |
237 | EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5 | |
238 | EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag | |
239 | EXPECT printer-up-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0 | |
240 | EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported | |
241 | EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 | |
242 | EXPECT uri-authentication-supported OF-TYPE keyword IN-GROUP printer-attributes-tag | |
243 | EXPECT uri-security-supported OF-TYPE keyword IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-authentication-supported | |
244 | } | |
245 | ||
246 | ||
247 | # Test Get-Printer-Attributes operation with requested-attributes | |
248 | # | |
249 | # Required by: RFC 2911 section 3.2.5 | |
250 | { | |
251 | NAME "3.2.5: Get-Printer-Attributes Operation (requested-attributes)" | |
252 | OPERATION Get-Printer-Attributes | |
253 | GROUP operation-attributes-tag | |
254 | ATTR charset attributes-charset utf-8 | |
255 | ATTR naturalLanguage attributes-natural-language en | |
256 | ATTR uri printer-uri $uri | |
257 | ATTR name requesting-user-name $user | |
258 | ATTR mimeMediaType document-format application/octet-stream | |
259 | ATTR keyword requested-attributes printer-uri-supported | |
260 | ||
261 | STATUS successful-ok | |
262 | ||
263 | EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag | |
264 | EXPECT !printer-name | |
265 | } | |
266 | ||
267 | ||
268 | # Test Get-Jobs operation | |
269 | # | |
270 | # Required by: RFC 2911 section 3.2.6 | |
271 | { | |
272 | NAME "3.2.6: Get-Jobs Operation (default)" | |
273 | OPERATION Get-Jobs | |
274 | GROUP operation-attributes-tag | |
275 | ATTR charset attributes-charset utf-8 | |
276 | ATTR naturalLanguage attributes-natural-language en | |
277 | ATTR uri printer-uri $uri | |
278 | ATTR name requesting-user-name $user | |
279 | ||
280 | STATUS successful-ok | |
281 | EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
282 | EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
283 | EXPECT !job-printer-uri | |
284 | EXPECT !job-more-info | |
285 | EXPECT !job-name | |
286 | EXPECT !job-originating-user-name | |
287 | EXPECT !job-state | |
288 | EXPECT !job-state-reasons | |
289 | EXPECT !job-state-message | |
290 | EXPECT !job-detailed-status-messages | |
291 | EXPECT !number-of-documents | |
292 | EXPECT !output-device-assigned | |
293 | EXPECT !time-at-creation | |
294 | EXPECT !time-at-processing | |
295 | EXPECT !time-at-completed | |
296 | EXPECT !job-printer-up-time | |
297 | EXPECT !date-time-at-creation | |
298 | EXPECT !date-time-at-processing | |
299 | EXPECT !date-time-at-completed | |
300 | EXPECT !number-of-intervening-jobs | |
301 | EXPECT !job-message-from-operator | |
302 | EXPECT !job-k-octets | |
303 | EXPECT !job-impressions | |
304 | EXPECT !job-media-sheets | |
305 | EXPECT !job-k-octets-processed | |
306 | EXPECT !job-impressions-completed | |
307 | EXPECT !job-media-sheets-completed | |
308 | ||
309 | EXPECT !copies | |
310 | EXPECT !finishings | |
311 | EXPECT !job-hold-until | |
312 | EXPECT !job-priority | |
313 | EXPECT !job-sheets | |
314 | EXPECT !media | |
315 | EXPECT !multiple-document-handling | |
316 | EXPECT !number-up | |
317 | EXPECT !orientation-requested | |
318 | EXPECT !pages-ranges | |
319 | EXPECT !print-quality | |
320 | EXPECT !printer-resolution | |
321 | EXPECT !sides | |
322 | } | |
323 | ||
324 | ||
325 | # Test Get-Jobs operation | |
326 | # | |
327 | # Required by: RFC 2911 section 3.2.6 | |
328 | { | |
329 | NAME "3.2.6: Get-Jobs Operation (requested-attributes)" | |
330 | OPERATION Get-Jobs | |
331 | GROUP operation-attributes-tag | |
332 | ATTR charset attributes-charset utf-8 | |
333 | ATTR naturalLanguage attributes-natural-language en | |
334 | ATTR uri printer-uri $uri | |
335 | ATTR name requesting-user-name $user | |
336 | ATTR keyword requested-attributes all | |
337 | ||
338 | STATUS successful-ok | |
339 | EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
340 | EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
341 | EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
342 | EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
343 | EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 | |
344 | EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 | |
345 | EXPECT job-state OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10 | |
346 | EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag | |
347 | EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 | |
348 | EXPECT ?job-detailed-status-messages OF-TYPE text IN-GROUP job-attributes-tag | |
349 | EXPECT ?number-of-documents OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
350 | EXPECT ?output-device-assigned OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 | |
351 | EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE no-value,>-1 | |
352 | EXPECT time-at-processing OF-TYPE no-value,integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE no-value,>-1 | |
353 | EXPECT time-at-completed OF-TYPE no-value,integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE no-value,>-1 | |
354 | EXPECT job-printer-up-time OF-TYPE no-value,integer IN-GROUP job-attributes-tag COUNT 1 | |
355 | EXPECT ?date-time-at-creation OF-TYPE no-value,dateTime IN-GROUP job-attributes-tag COUNT 1 | |
356 | EXPECT ?date-time-at-processing OF-TYPE no-value,dateTime IN-GROUP job-attributes-tag COUNT 1 | |
357 | EXPECT ?date-time-at-completed OF-TYPE no-value,dateTime IN-GROUP job-attributes-tag COUNT 1 | |
358 | EXPECT ?number-of-intervening-jobs OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
359 | EXPECT ?job-message-from-operator OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 | |
360 | EXPECT ?job-k-octets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
361 | EXPECT ?job-impressions OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
362 | EXPECT ?job-media-sheets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
363 | EXPECT ?job-k-octets-processed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
364 | EXPECT ?job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
365 | EXPECT ?job-media-sheets-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
366 | ||
367 | EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
368 | EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag | |
369 | EXPECT ?job-hold-until OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 | |
370 | EXPECT ?job-priority OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0,<101 | |
371 | EXPECT ?job-sheets OF-TYPE keyword|name IN-GROUP job-attributes-tag | |
372 | EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 | |
373 | EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag WITH-VALUE "/^(single-document|separate-documents-uncollated-copies|separate-documents-collated-copies|single-document-new-sheet)$$/" | |
374 | EXPECT ?number-up OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
375 | EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6 | |
376 | EXPECT ?pages-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag | |
377 | EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5 | |
378 | EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1 | |
379 | EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/" | |
380 | } | |
381 | ||
382 | ||
383 | # Test Get-Jobs operation | |
384 | # | |
385 | # Required by: RFC 2911 section 3.2.6 | |
386 | { | |
387 | NAME "3.2.6: Get-Jobs Operation (my-jobs)" | |
388 | OPERATION Get-Jobs | |
389 | GROUP operation-attributes-tag | |
390 | ATTR charset attributes-charset utf-8 | |
391 | ATTR naturalLanguage attributes-natural-language en | |
392 | ATTR uri printer-uri $uri | |
393 | ATTR name requesting-user-name $user | |
394 | ATTR boolean my-jobs true | |
395 | ||
396 | STATUS successful-ok | |
397 | EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
398 | EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
399 | EXPECT !job-printer-uri | |
400 | EXPECT !job-more-info | |
401 | EXPECT !job-name | |
402 | EXPECT !job-originating-user-name | |
403 | EXPECT !job-state | |
404 | EXPECT !job-state-reasons | |
405 | EXPECT !job-state-message | |
406 | EXPECT !job-detailed-status-messages | |
407 | EXPECT !number-of-documents | |
408 | EXPECT !output-device-assigned | |
409 | EXPECT !time-at-creation | |
410 | EXPECT !time-at-processing | |
411 | EXPECT !time-at-completed | |
412 | EXPECT !job-printer-up-time | |
413 | EXPECT !date-time-at-creation | |
414 | EXPECT !date-time-at-processing | |
415 | EXPECT !date-time-at-completed | |
416 | EXPECT !number-of-intervening-jobs | |
417 | EXPECT !job-message-from-operator | |
418 | EXPECT !job-k-octets | |
419 | EXPECT !job-impressions | |
420 | EXPECT !job-media-sheets | |
421 | EXPECT !job-k-octets-processed | |
422 | EXPECT !job-impressions-completed | |
423 | EXPECT !job-media-sheets-completed | |
424 | ||
425 | EXPECT !copies | |
426 | EXPECT !finishings | |
427 | EXPECT !job-hold-until | |
428 | EXPECT !job-priority | |
429 | EXPECT !job-sheets | |
430 | EXPECT !media | |
431 | EXPECT !multiple-document-handling | |
432 | EXPECT !number-up | |
433 | EXPECT !orientation-requested | |
434 | EXPECT !pages-ranges | |
435 | EXPECT !print-quality | |
436 | EXPECT !printer-resolution | |
437 | EXPECT !sides | |
438 | } | |
439 | ||
440 | ||
441 | # Test Get-Jobs operation | |
442 | # | |
443 | # Required by: RFC 2911 section 3.2.6 | |
444 | { | |
445 | NAME "3.2.6: Get-Jobs Operation (my-jobs different user)" | |
446 | OPERATION Get-Jobs | |
447 | GROUP operation-attributes-tag | |
448 | ATTR charset attributes-charset utf-8 | |
449 | ATTR naturalLanguage attributes-natural-language en | |
450 | ATTR uri printer-uri $uri | |
451 | ATTR name requesting-user-name not-$user | |
452 | ATTR boolean my-jobs true | |
453 | ||
454 | STATUS successful-ok | |
455 | EXPECT !job-id | |
456 | EXPECT !job-uri | |
457 | EXPECT !job-printer-uri | |
458 | EXPECT !job-more-info | |
459 | EXPECT !job-name | |
460 | EXPECT !job-originating-user-name | |
461 | EXPECT !job-state | |
462 | EXPECT !job-state-reasons | |
463 | EXPECT !job-state-message | |
464 | EXPECT !job-detailed-status-messages | |
465 | EXPECT !number-of-documents | |
466 | EXPECT !output-device-assigned | |
467 | EXPECT !time-at-creation | |
468 | EXPECT !time-at-processing | |
469 | EXPECT !time-at-completed | |
470 | EXPECT !job-printer-up-time | |
471 | EXPECT !date-time-at-creation | |
472 | EXPECT !date-time-at-processing | |
473 | EXPECT !date-time-at-completed | |
474 | EXPECT !number-of-intervening-jobs | |
475 | EXPECT !job-message-from-operator | |
476 | EXPECT !job-k-octets | |
477 | EXPECT !job-impressions | |
478 | EXPECT !job-media-sheets | |
479 | EXPECT !job-k-octets-processed | |
480 | EXPECT !job-impressions-completed | |
481 | EXPECT !job-media-sheets-completed | |
482 | ||
483 | EXPECT !copies | |
484 | EXPECT !finishings | |
485 | EXPECT !job-hold-until | |
486 | EXPECT !job-priority | |
487 | EXPECT !job-sheets | |
488 | EXPECT !media | |
489 | EXPECT !multiple-document-handling | |
490 | EXPECT !number-up | |
491 | EXPECT !orientation-requested | |
492 | EXPECT !pages-ranges | |
493 | EXPECT !print-quality | |
494 | EXPECT !printer-resolution | |
495 | EXPECT !sides | |
496 | } | |
497 | ||
498 | ||
499 | # Test Get-Jobs operation | |
500 | # | |
501 | # Required by: RFC 2911 section 3.2.6 | |
502 | { | |
503 | NAME "3.2.6: Get-Jobs Operation (which-jobs=not-completed)" | |
504 | OPERATION Get-Jobs | |
505 | GROUP operation-attributes-tag | |
506 | ATTR charset attributes-charset utf-8 | |
507 | ATTR naturalLanguage attributes-natural-language en | |
508 | ATTR uri printer-uri $uri | |
509 | ATTR name requesting-user-name $user | |
510 | ATTR keyword which-jobs not-completed | |
511 | ||
512 | STATUS successful-ok | |
513 | EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
514 | EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
515 | EXPECT !job-printer-uri | |
516 | EXPECT !job-more-info | |
517 | EXPECT !job-name | |
518 | EXPECT !job-originating-user-name | |
519 | EXPECT !job-state | |
520 | EXPECT !job-state-reasons | |
521 | EXPECT !job-state-message | |
522 | EXPECT !job-detailed-status-messages | |
523 | EXPECT !number-of-documents | |
524 | EXPECT !output-device-assigned | |
525 | EXPECT !time-at-creation | |
526 | EXPECT !time-at-processing | |
527 | EXPECT !time-at-completed | |
528 | EXPECT !job-printer-up-time | |
529 | EXPECT !date-time-at-creation | |
530 | EXPECT !date-time-at-processing | |
531 | EXPECT !date-time-at-completed | |
532 | EXPECT !number-of-intervening-jobs | |
533 | EXPECT !job-message-from-operator | |
534 | EXPECT !job-k-octets | |
535 | EXPECT !job-impressions | |
536 | EXPECT !job-media-sheets | |
537 | EXPECT !job-k-octets-processed | |
538 | EXPECT !job-impressions-completed | |
539 | EXPECT !job-media-sheets-completed | |
540 | ||
541 | EXPECT !copies | |
542 | EXPECT !finishings | |
543 | EXPECT !job-hold-until | |
544 | EXPECT !job-priority | |
545 | EXPECT !job-sheets | |
546 | EXPECT !media | |
547 | EXPECT !multiple-document-handling | |
548 | EXPECT !number-up | |
549 | EXPECT !orientation-requested | |
550 | EXPECT !pages-ranges | |
551 | EXPECT !print-quality | |
552 | EXPECT !printer-resolution | |
553 | EXPECT !sides | |
554 | } | |
555 | ||
556 | ||
557 | ||
558 | # Test Get-Jobs operation | |
559 | # | |
560 | # Required by: RFC 2911 section 3.2.6 | |
561 | { | |
562 | NAME "3.2.6: Get-Jobs Operation (which-jobs=completed)" | |
563 | OPERATION Get-Jobs | |
564 | GROUP operation-attributes-tag | |
565 | ATTR charset attributes-charset utf-8 | |
566 | ATTR naturalLanguage attributes-natural-language en | |
567 | ATTR uri printer-uri $uri | |
568 | ATTR name requesting-user-name $user | |
569 | ATTR keyword which-jobs completed | |
c7017ecc | 570 | DELAY 20 |
f8b3a85b MS |
571 | |
572 | STATUS successful-ok | |
573 | EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
574 | EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
575 | EXPECT !job-printer-uri | |
576 | EXPECT !job-more-info | |
577 | EXPECT !job-name | |
578 | EXPECT !job-originating-user-name | |
579 | EXPECT !job-state | |
580 | EXPECT !job-state-reasons | |
581 | EXPECT !job-state-message | |
582 | EXPECT !job-detailed-status-messages | |
583 | EXPECT !number-of-documents | |
584 | EXPECT !output-device-assigned | |
585 | EXPECT !time-at-creation | |
586 | EXPECT !time-at-processing | |
587 | EXPECT !time-at-completed | |
588 | EXPECT !job-printer-up-time | |
589 | EXPECT !date-time-at-creation | |
590 | EXPECT !date-time-at-processing | |
591 | EXPECT !date-time-at-completed | |
592 | EXPECT !number-of-intervening-jobs | |
593 | EXPECT !job-message-from-operator | |
594 | EXPECT !job-k-octets | |
595 | EXPECT !job-impressions | |
596 | EXPECT !job-media-sheets | |
597 | EXPECT !job-k-octets-processed | |
598 | EXPECT !job-impressions-completed | |
599 | EXPECT !job-media-sheets-completed | |
600 | ||
601 | EXPECT !copies | |
602 | EXPECT !finishings | |
603 | EXPECT !job-hold-until | |
604 | EXPECT !job-priority | |
605 | EXPECT !job-sheets | |
606 | EXPECT !media | |
607 | EXPECT !multiple-document-handling | |
608 | EXPECT !number-up | |
609 | EXPECT !orientation-requested | |
610 | EXPECT !pages-ranges | |
611 | EXPECT !print-quality | |
612 | EXPECT !printer-resolution | |
613 | EXPECT !sides | |
614 | } | |
615 | ||
616 | ||
617 | # Test Cancel-Job operation | |
618 | # | |
619 | # Required by: RFC 2911 section 3.3.3 | |
620 | { | |
621 | NAME "3.3.3: Cancel-Job Operation (completed job)" | |
622 | OPERATION Cancel-Job | |
623 | GROUP operation-attributes-tag | |
624 | ATTR charset attributes-charset utf-8 | |
625 | ATTR naturalLanguage attributes-natural-language en | |
626 | ATTR uri printer-uri $uri | |
627 | ATTR integer job-id $job-id | |
628 | ATTR name requesting-user-name $user | |
629 | ||
630 | STATUS client-error-not-possible | |
631 | } | |
632 | ||
633 | ||
634 | # Test Print-Job operation | |
635 | # | |
636 | # Required by: RFC 2911 section 3.2.1 | |
637 | { | |
638 | NAME "3.2.1: Print-Job Operation" | |
639 | OPERATION Print-Job | |
640 | GROUP operation-attributes-tag | |
641 | ATTR charset attributes-charset utf-8 | |
642 | ATTR naturalLanguage attributes-natural-language en | |
643 | ATTR uri printer-uri $uri | |
644 | ATTR name requesting-user-name $user | |
645 | ATTR name job-name $filename | |
646 | ATTR boolean ipp-attribute-fidelity false | |
647 | ATTR name document-name $filename | |
648 | ATTR keyword compression none | |
649 | ATTR mimeMediaType document-format application/octet-stream | |
650 | FILE $filename | |
651 | ||
652 | STATUS successful-ok | |
653 | STATUS client-error-document-format-not-supported | |
654 | EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag | |
655 | EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag | |
656 | WITH-VALUE >0 | |
657 | EXPECT job-state OF-TYPE enum COUNT 1 IN-GROUP job-attributes-tag | |
658 | WITH-VALUE 3,4,5,6,7,8,9 | |
659 | EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag | |
660 | EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag | |
661 | EXPECT ?number-of-intervening-jobs OF-TYPE integer | |
662 | IN-GROUP job-attributes-tag WITH-VALUE >-1 | |
663 | } | |
664 | ||
665 | ||
666 | # Test Cancel-Job operation | |
667 | # | |
668 | # Required by: RFC 2911 section 3.3.3 | |
669 | { | |
670 | NAME "3.3.3: Cancel-Job Operation (pending/processing job)" | |
671 | OPERATION Cancel-Job | |
672 | GROUP operation-attributes-tag | |
673 | ATTR charset attributes-charset utf-8 | |
674 | ATTR naturalLanguage attributes-natural-language en | |
675 | ATTR uri printer-uri $uri | |
676 | ATTR integer job-id $job-id | |
677 | ATTR name requesting-user-name $user | |
678 | ||
679 | STATUS successful-ok | |
680 | } | |
681 | ||
682 | ||
683 | # Test Get-Job-Attributes operation | |
684 | # | |
685 | # Required by: RFC 2911 section 3.3.4 | |
686 | { | |
687 | NAME "3.3.4: Get-Job-Attributes Operation" | |
688 | OPERATION Get-Job-Attributes | |
689 | GROUP operation-attributes-tag | |
690 | ATTR charset attributes-charset utf-8 | |
691 | ATTR naturalLanguage attributes-natural-language en | |
692 | ATTR uri printer-uri $uri | |
693 | ATTR integer job-id $job-id | |
694 | ATTR name requesting-user-name $user | |
695 | ||
696 | STATUS successful-ok | |
697 | EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
698 | EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
699 | EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
700 | EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 | |
701 | EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 | |
702 | EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 | |
703 | EXPECT job-state OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10 | |
704 | EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag | |
705 | EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 | |
706 | EXPECT ?job-detailed-status-messages OF-TYPE text IN-GROUP job-attributes-tag | |
707 | EXPECT ?number-of-documents OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
708 | EXPECT ?output-device-assigned OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 | |
709 | EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE no-value,>-1 | |
710 | EXPECT time-at-processing OF-TYPE no-value,integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE no-value,>-1 | |
711 | EXPECT time-at-completed OF-TYPE no-value,integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE no-value,>-1 | |
712 | EXPECT job-printer-up-time OF-TYPE no-value,integer IN-GROUP job-attributes-tag COUNT 1 | |
713 | EXPECT ?date-time-at-creation OF-TYPE no-value,dateTime IN-GROUP job-attributes-tag COUNT 1 | |
714 | EXPECT ?date-time-at-processing OF-TYPE no-value,dateTime IN-GROUP job-attributes-tag COUNT 1 | |
715 | EXPECT ?date-time-at-completed OF-TYPE no-value,dateTime IN-GROUP job-attributes-tag COUNT 1 | |
716 | EXPECT ?number-of-intervening-jobs OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
717 | EXPECT ?job-message-from-operator OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 | |
718 | EXPECT ?job-k-octets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
719 | EXPECT ?job-impressions OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
720 | EXPECT ?job-media-sheets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
721 | EXPECT ?job-k-octets-processed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
722 | EXPECT ?job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
723 | EXPECT ?job-media-sheets-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 | |
724 | ||
725 | EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
726 | EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag | |
727 | EXPECT ?job-hold-until OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 | |
728 | EXPECT ?job-priority OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0,<101 | |
729 | EXPECT ?job-sheets OF-TYPE keyword|name IN-GROUP job-attributes-tag | |
730 | EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 | |
731 | EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag WITH-VALUE "/^(single-document|separate-documents-uncollated-copies|separate-documents-collated-copies|single-document-new-sheet)$$/" | |
732 | EXPECT ?number-up OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0 | |
733 | EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6 | |
734 | EXPECT ?pages-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag | |
735 | EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5 | |
736 | EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1 | |
737 | EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/" | |
738 | } | |
739 | ||
740 | ||
741 | # | |
742 | # End of "$Id$". | |
743 | # |