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