]> git.ipfire.org Git - thirdparty/cups.git/blob - test/ipp-1.1.test
Import CUPS v2.0.3
[thirdparty/cups.git] / test / ipp-1.1.test
1 #
2 # "$Id: ipp-1.1.test 12663 2015-05-25 14:32:17Z msweet $"
3 #
4 # IPP/1.1 test suite.
5 #
6 # Copyright 2007-2015 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 # ./ipptool -f filename [-d document-uri=SOMEURI] -t printer-uri ipp-1.1.test
18 # ./ipptool -f filename -d NOPRINT=1 -t printer-uri ipp-1.1.test
19 #
20 # The latter form disables all but the basic file printing.
21 #
22
23 # Regular expressions for URI schemes:
24 #
25 # HTTP_URI_SCHEME - Matches strings beginning with http:// or https://
26 # IPP_URI_SCHEME - Matches strings beginning with ipp:// or ipps://
27
28 DEFINE HTTP_URI_SCHEME "/^https?://.+$$/"
29 DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/"
30
31 # Test that a request-id value of 0 is not accepted.
32 #
33 # Required by: RFC 2911 section 3.1.1
34 {
35 NAME "RFC 2911 section 3.1.1: Bad request-id value 0"
36 REQUEST-ID 0
37 OPERATION Get-Printer-Attributes
38 GROUP operation-attributes-tag
39 ATTR charset attributes-charset utf-8
40 ATTR naturalLanguage attributes-natural-language en
41 ATTR uri printer-uri $uri
42
43 STATUS client-error-bad-request
44 EXPECT !printer-uri-supported
45 }
46
47
48 # Test that the first two attributes must be attributes-charset and
49 # attributes-natural-language.
50 #
51 # Required by: RFC 2911 section 3.1.4
52 {
53 NAME "RFC 2911 section 3.1.4: No Operation Attributes"
54 REQUEST-ID random
55 OPERATION Get-Printer-Attributes
56 GROUP operation-attributes-tag
57
58 STATUS client-error-bad-request
59 EXPECT !printer-uri-supported
60 }
61 {
62 NAME "RFC 2911 section 3.1.4: attributes-charset"
63 OPERATION Get-Printer-Attributes
64 GROUP operation-attributes-tag
65 ATTR charset attributes-charset utf-8
66 ATTR uri printer-uri $uri
67
68 STATUS client-error-bad-request
69 EXPECT !printer-uri-supported
70 }
71 {
72 NAME "RFC 2911 section 3.1.4: attributes-natural-language"
73 OPERATION Get-Printer-Attributes
74 GROUP operation-attributes-tag
75 ATTR naturalLanguage attributes-natural-language en
76 ATTR uri printer-uri $uri
77
78 STATUS client-error-bad-request
79 EXPECT !printer-uri-supported
80 }
81 {
82 NAME "RFC 2911 section 3.1.4: attributes-natural-language + attributes-charset"
83 OPERATION Get-Printer-Attributes
84 GROUP operation-attributes-tag
85 ATTR naturalLanguage attributes-natural-language en
86 ATTR charset attributes-charset utf-8
87 ATTR uri printer-uri $uri
88
89 STATUS client-error-bad-request
90 EXPECT !printer-uri-supported
91 }
92 {
93 NAME "RFC 2911 section 3.1.4: attributes-charset + attributes-natural-language"
94 OPERATION Get-Printer-Attributes
95 GROUP operation-attributes-tag
96 ATTR charset attributes-charset utf-8
97 ATTR naturalLanguage attributes-natural-language en
98 ATTR uri printer-uri $uri
99
100 STATUS successful-ok
101 EXPECT printer-uri-supported OF-TYPE uri WITH-ALL-VALUES "$IPP_URI_SCHEME"
102 }
103
104
105 # Test that bad IPP versions are not supported.
106 #
107 # Required by: RFC 2911 section 3.1.8
108 {
109 # The name of the test...
110 NAME "RFC 2911 section 3.1.8: Unsupported IPP version 0.0"
111 VERSION 0.0
112 OPERATION Get-Printer-Attributes
113 GROUP operation-attributes-tag
114 ATTR charset attributes-charset utf-8
115 ATTR naturalLanguage attributes-natural-language en
116 ATTR uri printer-uri $uri
117
118 STATUS server-error-version-not-supported
119 EXPECT !printer-uri-supported
120 }
121
122
123 # Test that printer operations require the printer-uri operation attribute.
124 #
125 # Required by: RFC 2911 section 3.2
126 {
127 NAME "RFC 2911 section 3.2: No printer-uri operation attribute"
128 OPERATION Get-Printer-Attributes
129 GROUP operation-attributes-tag
130 ATTR charset attributes-charset utf-8
131 ATTR naturalLanguage attributes-natural-language en
132
133 STATUS client-error-bad-request
134 EXPECT !printer-uri-supported
135 }
136
137
138 # Test Print-Job operation
139 #
140 # Required by: RFC 2911 section 3.2.1
141 {
142 NAME "RFC 2911 section 3.2.1: Print-Job Operation"
143 OPERATION Print-Job
144 GROUP operation-attributes-tag
145 ATTR charset attributes-charset utf-8
146 ATTR naturalLanguage attributes-natural-language en
147 ATTR uri printer-uri $uri
148 ATTR name requesting-user-name $user
149 ATTR name job-name $filename
150 ATTR boolean ipp-attribute-fidelity false
151 ATTR name document-name $filename
152 ATTR keyword compression none
153 ATTR mimeMediaType document-format $filetype
154 FILE $filename
155
156 STATUS successful-ok
157 STATUS client-error-document-format-not-supported
158 STATUS server-error-job-canceled
159 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
160
161 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
162 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
163 WITH-VALUE >0
164 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
165 WITH-VALUE 3,4,5,6,7,8,9
166 EXPECT job-state WITH-VALUE 7,8,9 DEFINE-MATCH PRINT_JOB_COMPLETED
167 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
168 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
169 EXPECT ?number-of-intervening-jobs OF-TYPE integer
170 IN-GROUP job-attributes-tag WITH-VALUE >-1
171 }
172
173 # Test Validate-Job operation
174 #
175 # Required by: RFC 2911 section 3.2.3
176 {
177 NAME "RFC 2911 section 3.2.3: Validate-Job Operation"
178 OPERATION Validate-Job
179 GROUP operation-attributes-tag
180 ATTR charset attributes-charset utf-8
181 ATTR naturalLanguage attributes-natural-language en
182 ATTR uri printer-uri $uri
183 ATTR name requesting-user-name $user
184 ATTR name job-name $filename
185 ATTR boolean ipp-attribute-fidelity false
186 ATTR name document-name $filename
187 ATTR keyword compression none
188 ATTR mimeMediaType document-format $filetype
189
190 STATUS successful-ok
191 }
192
193
194 # Test Get-Printer-Attributes operation
195 #
196 # Required by: RFC 2911 section 3.2.5
197 {
198 NAME "RFC 2911 section 3.2.5: Get-Printer-Attributes Operation (default)"
199 OPERATION Get-Printer-Attributes
200 GROUP operation-attributes-tag
201 ATTR charset attributes-charset utf-8
202 ATTR naturalLanguage attributes-natural-language en
203 ATTR uri printer-uri $uri
204 ATTR name requesting-user-name $user
205 ATTR mimeMediaType document-format $filetype
206
207 STATUS successful-ok
208
209 # Display some useful information to identify the test
210 DISPLAY color-supported
211 DISPLAY compression-supported
212 DISPLAY document-format-supported
213 DISPLAY finishings-supported
214 DISPLAY ipp-versions-supported
215 DISPLAY job-sheets-supported
216 DISPLAY media-supported
217 DISPLAY number-up-supported
218 DISPLAY operations-supported
219 DISPLAY pages-per-minute
220 DISPLAY pages-per-minute-color
221 DISPLAY print-quality-supported
222 DISPLAY printer-uri-supported
223 DISPLAY reference-uri-schemes-supported
224 DISPLAY sizes-supported
225 DISPLAY uri-authentication-supported
226 DISPLAY uri-security-supported
227
228 # Operations
229 EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0002 # Print-Job
230 EXPECT operations-supported WITH-VALUE 0x0003 DEFINE-MATCH OPTIONAL_PRINT_URI # Print-URI
231 EXPECT operations-supported WITH-VALUE 0x0004 # Validate-Job
232 EXPECT operations-supported WITH-VALUE 0x0005 DEFINE-MATCH OPTIONAL_CREATE_JOB # Create-Job
233 EXPECT operations-supported WITH-VALUE 0x0006 DEFINE-MATCH OPTIONAL_SEND_DOCUMENT # Send-Document
234 EXPECT operations-supported WITH-VALUE 0x0007 DEFINE-MATCH OPTIONAL_SEND_URI # Send-URI
235 EXPECT operations-supported WITH-VALUE 0x0008 # Cancel-Job
236 EXPECT operations-supported WITH-VALUE 0x0009 # Get-Job-Attributes
237 EXPECT operations-supported WITH-VALUE 0x000a # Get-Jobs
238 EXPECT operations-supported WITH-VALUE 0x000b # Get-Printer-Attributes
239 EXPECT operations-supported WITH-VALUE 0x000c DEFINE-MATCH OPTIONAL_HOLD_JOB # Hold-Job
240 EXPECT operations-supported WITH-VALUE 0x000d DEFINE-MATCH OPTIONAL_RELEASE_JOB # Release-Job
241 EXPECT operations-supported WITH-VALUE 0x000e DEFINE-MATCH OPTIONAL_RESTART_JOB # Restart-Job
242 EXPECT operations-supported WITH-VALUE 0x0010 DEFINE-MATCH OPTIONAL_PAUSE_PRINTER # Pause-Printer
243 EXPECT operations-supported WITH-VALUE 0x0011 DEFINE-MATCH OPTIONAL_RESUME_PRINTER # Resume-Printer
244 EXPECT operations-supported WITH-VALUE 0x0012 DEFINE-MATCH OPTIONAL_PURGE_JOBS # Purge-Jobs
245
246 # Job template attributes
247 EXPECT ?copies-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
248 EXPECT ?copies-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag
249 EXPECT ?finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag
250 EXPECT ?finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3
251 EXPECT ?job-hold-until-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
252 EXPECT ?job-hold-until-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE no-hold
253 EXPECT job-hold-until-default IF-DEFINED OPTIONAL_HOLD_JOB
254 EXPECT job-hold-until-supported IF-DEFINED OPTIONAL_HOLD_JOB
255 EXPECT ?job-priority-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0,<101
256 EXPECT ?job-priority-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0,<101
257 EXPECT ?job-sheets-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag
258 EXPECT ?job-sheets-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE none
259 EXPECT ?media-default OF-TYPE no-value|keyword|name IN-GROUP printer-attributes-tag COUNT 1
260 EXPECT ?media-ready OF-TYPE keyword|name IN-GROUP printer-attributes-tag
261 EXPECT ?media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
262 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)$$/"
263 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)$$/"
264 EXPECT ?number-up-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
265 EXPECT ?number-up-supported OF-TYPE integer|rangeOfInteger IN-GROUP printer-attributes-tag WITH-VALUE >0
266 EXPECT ?number-up-supported WITH-VALUE 1
267 EXPECT ?orientation-requested-default OF-TYPE no-value|enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6
268 EXPECT ?orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6
269 EXPECT ?pages-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag
270 EXPECT ?print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
271 EXPECT ?print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5
272 EXPECT ?printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1
273 EXPECT ?printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
274 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)$$/"
275 EXPECT ?sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
276
277 # Job template attributes for specific tests...
278 EXPECT copies-supported WITH-VALUE >1 DEFINE-MATCH OPTIONAL_COPIES
279 EXPECT document-format-supported WITH-VALUE "application/pdf" DEFINE-MATCH OPTIONAL_PDF
280 EXPECT document-format-supported WITH-VALUE "application/postscript" DEFINE-MATCH OPTIONAL_POSTSCRIPT
281 EXPECT document-format-supported WITH-VALUE "image/jpeg" DEFINE-MATCH OPTIONAL_JPEG
282 EXPECT job-sheets-supported WITH-VALUE "standard" DEFINE-MATCH OPTIONAL_STANDARD_SHEET
283 EXPECT media-supported WITH-VALUE "a4" DEFINE-VALUE OPTIONAL_A4_MEDIA
284 EXPECT media-supported WITH-VALUE "iso-a4" DEFINE-VALUE OPTIONAL_A4_MEDIA
285 EXPECT media-supported WITH-VALUE "iso_a4_210x297mm" DEFINE-VALUE OPTIONAL_A4_MEDIA
286 EXPECT media-supported WITH-VALUE "letter" DEFINE-VALUE OPTIONAL_LETTER_MEDIA
287 EXPECT media-supported WITH-VALUE "na-letter" DEFINE-VALUE OPTIONAL_LETTER_MEDIA
288 EXPECT media-supported WITH-VALUE "na_letter_8.5x11in" DEFINE-VALUE OPTIONAL_LETTER_MEDIA
289 EXPECT media-supported WITH-VALUE "index-4x6" DEFINE-VALUE OPTIONAL_4X6_MEDIA
290 EXPECT media-supported WITH-VALUE "na_index-4x6_4x6in" DEFINE-VALUE OPTIONAL_4X6_MEDIA
291 EXPECT number-up-supported WITH-VALUE 2 DEFINE-MATCH OPTIONAL_2UP
292 EXPECT print-quality WITH-VALUE 3 DEFINE-MATCH OPTIONAL_DRAFT_QUALITY
293 EXPECT print-quality WITH-VALUE 4 DEFINE-MATCH OPTIONAL_NORMAL_QUALITY
294 EXPECT print-quality WITH-VALUE 5 DEFINE-MATCH OPTIONAL_BEST_QUALITY
295 EXPECT sides-supported WITH-VALUE "two-sided-long-edge" DEFINE-MATCH OPTIONAL_DUPLEX
296
297 # Printer description attributes
298 EXPECT ?color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
299 EXPECT ?job-impressions-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
300 EXPECT ?job-k-octets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
301 EXPECT ?job-media-sheets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
302 EXPECT ?multiple-document-jobs-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
303 EXPECT ?multiple-operation-time-out OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
304 EXPECT ?pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
305 EXPECT ?pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
306 EXPECT ?printer-driver-installer OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
307 EXPECT ?printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
308 EXPECT ?printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
309 EXPECT ?printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
310 EXPECT ?printer-message-from-operator OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
311 EXPECT ?printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
312 EXPECT ?printer-more-info-manufacturer OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
313 EXPECT ?printer-state-message OF-TYPE text IN-GROUP printer-attributes-tag
314 EXPECT ?reference-uri-schemes-supported OF-TYPE uriScheme IN-GROUP printer-attributes-tag
315 EXPECT reference-uri-schemes-supported WITH-VALUE "ftp" IF-DEFINED OPTIONAL_PRINT_URI
316 EXPECT reference-uri-schemes-supported WITH-VALUE "ftp" IF-DEFINED OPTIONAL_SEND_URI IF-NOT-DEFINED OPTIONAL_PRINT_URI
317 EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag COUNT 1
318 EXPECT charset-supported OF-TYPE charset IN-GROUP printer-attributes-tag WITH-VALUE utf-8
319 EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE none
320 EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag COUNT 1
321 EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag
322 EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag
323 EXPECT ipp-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE 1.1
324 EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1
325 EXPECT pdl-override-supported OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1
326 EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
327 EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
328 EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
329 EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag
330 EXPECT printer-up-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
331 EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported WITH-ALL-VALUES "$IPP_URI_SCHEME"
332 EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
333 EXPECT uri-authentication-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
334 EXPECT uri-security-supported OF-TYPE keyword IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-authentication-supported
335 }
336
337
338 # Test Get-Printer-Attributes operation with requested-attributes
339 #
340 # Required by: RFC 2911 section 3.2.5
341 {
342 NAME "RFC 2911 section 3.2.5: Get-Printer-Attributes Operation (requested-attributes)"
343 OPERATION Get-Printer-Attributes
344 GROUP operation-attributes-tag
345 ATTR charset attributes-charset utf-8
346 ATTR naturalLanguage attributes-natural-language en
347 ATTR uri printer-uri $uri
348 ATTR name requesting-user-name $user
349 ATTR mimeMediaType document-format $filetype
350 ATTR keyword requested-attributes printer-uri-supported
351
352 STATUS successful-ok
353
354 EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$IPP_URI_SCHEME"
355 EXPECT !printer-name
356 }
357
358
359 # Test Get-Jobs operation
360 #
361 # Required by: RFC 2911 section 3.2.6
362 {
363 NAME "RFC 2911 section 3.2.6: Get-Jobs Operation (default)"
364 OPERATION Get-Jobs
365 GROUP operation-attributes-tag
366 ATTR charset attributes-charset utf-8
367 ATTR naturalLanguage attributes-natural-language en
368 ATTR uri printer-uri $uri
369 ATTR name requesting-user-name $user
370
371 STATUS successful-ok
372 EXPECT ?job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
373 EXPECT ?job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
374 EXPECT !job-printer-uri
375 EXPECT !job-more-info
376 EXPECT !job-name
377 EXPECT !job-originating-user-name
378 EXPECT !job-state
379 EXPECT !job-state-reasons
380 EXPECT !job-state-message
381 EXPECT !job-detailed-status-messages
382 EXPECT !number-of-documents
383 EXPECT !output-device-assigned
384 EXPECT !time-at-creation
385 EXPECT !time-at-processing
386 EXPECT !time-at-completed
387 EXPECT !job-printer-up-time
388 EXPECT !date-time-at-creation
389 EXPECT !date-time-at-processing
390 EXPECT !date-time-at-completed
391 EXPECT !number-of-intervening-jobs
392 EXPECT !job-message-from-operator
393 EXPECT !job-k-octets
394 EXPECT !job-impressions
395 EXPECT !job-media-sheets
396 EXPECT !job-k-octets-processed
397 EXPECT !job-impressions-completed
398 EXPECT !job-media-sheets-completed
399
400 EXPECT !copies
401 EXPECT !finishings
402 EXPECT !job-hold-until
403 EXPECT !job-priority
404 EXPECT !job-sheets
405 EXPECT !media
406 EXPECT !multiple-document-handling
407 EXPECT !number-up
408 EXPECT !orientation-requested
409 EXPECT !pages-ranges
410 EXPECT !print-quality
411 EXPECT !printer-resolution
412 EXPECT !sides
413 }
414
415
416 # Test Get-Jobs operation
417 #
418 # Required by: RFC 2911 section 3.2.6
419 {
420 SKIP-IF-DEFINED PRINT_JOB_COMPLETED
421
422 NAME "RFC 2911 section 3.2.6: Get-Jobs Operation (requested-attributes)"
423 OPERATION Get-Jobs
424 GROUP operation-attributes-tag
425 ATTR charset attributes-charset utf-8
426 ATTR naturalLanguage attributes-natural-language en
427 ATTR uri printer-uri $uri
428 ATTR name requesting-user-name $user
429 ATTR keyword requested-attributes all
430
431 STATUS successful-ok
432 EXPECT ?job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
433 EXPECT ?job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
434 EXPECT ?job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
435 EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
436 EXPECT ?job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
437 EXPECT ?job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
438 EXPECT ?job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10
439 EXPECT ?job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
440 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
441 EXPECT ?job-detailed-status-messages OF-TYPE text IN-GROUP job-attributes-tag
442 EXPECT ?number-of-documents OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
443 EXPECT ?output-device-assigned OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
444 EXPECT ?time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
445 EXPECT ?time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
446 EXPECT ?time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
447 EXPECT ?job-printer-up-time OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1
448 EXPECT ?date-time-at-creation OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
449 EXPECT ?date-time-at-processing OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
450 EXPECT ?date-time-at-completed OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
451 EXPECT ?number-of-intervening-jobs OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
452 EXPECT ?job-message-from-operator OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
453 EXPECT ?job-k-octets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
454 EXPECT ?job-impressions OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
455 EXPECT ?job-media-sheets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
456 EXPECT ?job-k-octets-processed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
457 EXPECT ?job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
458 EXPECT ?job-media-sheets-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
459
460 EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
461 EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
462 EXPECT ?job-hold-until OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
463 EXPECT ?job-priority OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0,<101
464 EXPECT ?job-sheets OF-TYPE keyword|name IN-GROUP job-attributes-tag
465 EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
466 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)$$/"
467 EXPECT ?number-up OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
468 EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6
469 EXPECT ?pages-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag
470 EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5
471 EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1
472 EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
473 }
474
475
476 # Test Get-Jobs operation
477 #
478 # Required by: RFC 2911 section 3.2.6
479 {
480 SKIP-IF-DEFINED PRINT_JOB_COMPLETED
481
482 NAME "RFC 2911 section 3.2.6: Get-Jobs Operation (my-jobs)"
483 OPERATION Get-Jobs
484 GROUP operation-attributes-tag
485 ATTR charset attributes-charset utf-8
486 ATTR naturalLanguage attributes-natural-language en
487 ATTR uri printer-uri $uri
488 ATTR name requesting-user-name $user
489 ATTR boolean my-jobs true
490
491 STATUS successful-ok
492 EXPECT ?job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
493 EXPECT ?job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
494 EXPECT !job-printer-uri
495 EXPECT !job-more-info
496 EXPECT !job-name
497 EXPECT !job-originating-user-name
498 EXPECT !job-state
499 EXPECT !job-state-reasons
500 EXPECT !job-state-message
501 EXPECT !job-detailed-status-messages
502 EXPECT !number-of-documents
503 EXPECT !output-device-assigned
504 EXPECT !time-at-creation
505 EXPECT !time-at-processing
506 EXPECT !time-at-completed
507 EXPECT !job-printer-up-time
508 EXPECT !date-time-at-creation
509 EXPECT !date-time-at-processing
510 EXPECT !date-time-at-completed
511 EXPECT !number-of-intervening-jobs
512 EXPECT !job-message-from-operator
513 EXPECT !job-k-octets
514 EXPECT !job-impressions
515 EXPECT !job-media-sheets
516 EXPECT !job-k-octets-processed
517 EXPECT !job-impressions-completed
518 EXPECT !job-media-sheets-completed
519
520 EXPECT !copies
521 EXPECT !finishings
522 EXPECT !job-hold-until
523 EXPECT !job-priority
524 EXPECT !job-sheets
525 EXPECT !media
526 EXPECT !multiple-document-handling
527 EXPECT !number-up
528 EXPECT !orientation-requested
529 EXPECT !pages-ranges
530 EXPECT !print-quality
531 EXPECT !printer-resolution
532 EXPECT !sides
533 }
534
535
536 # Test Get-Jobs operation
537 #
538 # Required by: RFC 2911 section 3.2.6
539 {
540 SKIP-IF-DEFINED PRINT_JOB_COMPLETED
541
542 # Skip this test when doing authenticated printing since we'll always
543 # use the authenticated username over the requesting-user-name value.
544 SKIP-IF-DEFINED uriuser
545
546 NAME "RFC 2911 section 3.2.6: Get-Jobs Operation (my-jobs different user)"
547 OPERATION Get-Jobs
548 GROUP operation-attributes-tag
549 ATTR charset attributes-charset utf-8
550 ATTR naturalLanguage attributes-natural-language en
551 ATTR uri printer-uri $uri
552 ATTR name requesting-user-name not-$user
553 ATTR boolean my-jobs true
554
555 STATUS successful-ok
556 EXPECT !job-id
557 EXPECT !job-uri
558 EXPECT !job-printer-uri
559 EXPECT !job-more-info
560 EXPECT !job-name
561 EXPECT !job-originating-user-name
562 EXPECT !job-state
563 EXPECT !job-state-reasons
564 EXPECT !job-state-message
565 EXPECT !job-detailed-status-messages
566 EXPECT !number-of-documents
567 EXPECT !output-device-assigned
568 EXPECT !time-at-creation
569 EXPECT !time-at-processing
570 EXPECT !time-at-completed
571 EXPECT !job-printer-up-time
572 EXPECT !date-time-at-creation
573 EXPECT !date-time-at-processing
574 EXPECT !date-time-at-completed
575 EXPECT !number-of-intervening-jobs
576 EXPECT !job-message-from-operator
577 EXPECT !job-k-octets
578 EXPECT !job-impressions
579 EXPECT !job-media-sheets
580 EXPECT !job-k-octets-processed
581 EXPECT !job-impressions-completed
582 EXPECT !job-media-sheets-completed
583
584 EXPECT !copies
585 EXPECT !finishings
586 EXPECT !job-hold-until
587 EXPECT !job-priority
588 EXPECT !job-sheets
589 EXPECT !media
590 EXPECT !multiple-document-handling
591 EXPECT !number-up
592 EXPECT !orientation-requested
593 EXPECT !pages-ranges
594 EXPECT !print-quality
595 EXPECT !printer-resolution
596 EXPECT !sides
597 }
598
599
600 # Test Get-Jobs operation
601 #
602 # Required by: RFC 2911 section 3.2.6
603 {
604 SKIP-IF-DEFINED PRINT_JOB_COMPLETED
605
606 NAME "RFC 2911 section 3.2.6: Get-Jobs Operation (which-jobs=not-completed)"
607 OPERATION Get-Jobs
608 GROUP operation-attributes-tag
609 ATTR charset attributes-charset utf-8
610 ATTR naturalLanguage attributes-natural-language en
611 ATTR uri printer-uri $uri
612 ATTR name requesting-user-name $user
613 ATTR keyword which-jobs not-completed
614
615 STATUS successful-ok
616 EXPECT ?job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
617 EXPECT ?job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
618 EXPECT !job-printer-uri
619 EXPECT !job-more-info
620 EXPECT !job-name
621 EXPECT !job-originating-user-name
622 EXPECT !job-state
623 EXPECT !job-state-reasons
624 EXPECT !job-state-message
625 EXPECT !job-detailed-status-messages
626 EXPECT !number-of-documents
627 EXPECT !output-device-assigned
628 EXPECT !time-at-creation
629 EXPECT !time-at-processing
630 EXPECT !time-at-completed
631 EXPECT !job-printer-up-time
632 EXPECT !date-time-at-creation
633 EXPECT !date-time-at-processing
634 EXPECT !date-time-at-completed
635 EXPECT !number-of-intervening-jobs
636 EXPECT !job-message-from-operator
637 EXPECT !job-k-octets
638 EXPECT !job-impressions
639 EXPECT !job-media-sheets
640 EXPECT !job-k-octets-processed
641 EXPECT !job-impressions-completed
642 EXPECT !job-media-sheets-completed
643
644 EXPECT !copies
645 EXPECT !finishings
646 EXPECT !job-hold-until
647 EXPECT !job-priority
648 EXPECT !job-sheets
649 EXPECT !media
650 EXPECT !multiple-document-handling
651 EXPECT !number-up
652 EXPECT !orientation-requested
653 EXPECT !pages-ranges
654 EXPECT !print-quality
655 EXPECT !printer-resolution
656 EXPECT !sides
657 }
658
659
660 # Wait for job to complete...
661 {
662 SKIP-IF-NOT-DEFINED job-id
663
664 NAME "Get-Job-Attributes Until Job Complete"
665 OPERATION Get-Job-Attributes
666 GROUP operation-attributes-tag
667 ATTR charset attributes-charset utf-8
668 ATTR naturalLanguage attributes-natural-language en
669 ATTR uri printer-uri $uri
670 ATTR integer job-id $job-id
671 ATTR name requesting-user-name $user
672
673 STATUS successful-ok
674 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6 REPEAT-NO-MATCH REPEAT-LIMIT 30
675 DISPLAY job-state
676 }
677
678
679 # Test Get-Jobs operation
680 #
681 # Required by: RFC 2911 section 3.2.6
682 {
683 NAME "RFC 2911 section 3.2.6: Get-Jobs Operation (which-jobs=completed)"
684 OPERATION Get-Jobs
685 GROUP operation-attributes-tag
686 ATTR charset attributes-charset utf-8
687 ATTR naturalLanguage attributes-natural-language en
688 ATTR uri printer-uri $uri
689 ATTR name requesting-user-name $user
690 ATTR keyword which-jobs completed
691
692 STATUS successful-ok
693 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
694 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
695 EXPECT !job-printer-uri
696 EXPECT !job-more-info
697 EXPECT !job-name
698 EXPECT !job-originating-user-name
699 EXPECT !job-state
700 EXPECT !job-state-reasons
701 EXPECT !job-state-message
702 EXPECT !job-detailed-status-messages
703 EXPECT !number-of-documents
704 EXPECT !output-device-assigned
705 EXPECT !time-at-creation
706 EXPECT !time-at-processing
707 EXPECT !time-at-completed
708 EXPECT !job-printer-up-time
709 EXPECT !date-time-at-creation
710 EXPECT !date-time-at-processing
711 EXPECT !date-time-at-completed
712 EXPECT !number-of-intervening-jobs
713 EXPECT !job-message-from-operator
714 EXPECT !job-k-octets
715 EXPECT !job-impressions
716 EXPECT !job-media-sheets
717 EXPECT !job-k-octets-processed
718 EXPECT !job-impressions-completed
719 EXPECT !job-media-sheets-completed
720
721 EXPECT !copies
722 EXPECT !finishings
723 EXPECT !job-hold-until
724 EXPECT !job-priority
725 EXPECT !job-sheets
726 EXPECT !media
727 EXPECT !multiple-document-handling
728 EXPECT !number-up
729 EXPECT !orientation-requested
730 EXPECT !pages-ranges
731 EXPECT !print-quality
732 EXPECT !printer-resolution
733 EXPECT !sides
734 }
735
736
737 # Test Get-Jobs operation
738 #
739 # Required by: RFC 2911 section 3.2.6
740 {
741 SKIP-IF-DEFINED PRINT_JOB_COMPLETED
742
743 NAME "RFC 2911 section 3.2.6: Get-Jobs Operation (which-jobs, requested-attributes)"
744 OPERATION Get-Jobs
745 GROUP operation-attributes-tag
746 ATTR charset attributes-charset utf-8
747 ATTR naturalLanguage attributes-natural-language en
748 ATTR uri printer-uri $uri
749 ATTR name requesting-user-name $user
750 ATTR keyword requested-attributes all
751 ATTR keyword which-jobs completed
752
753 STATUS successful-ok
754 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
755 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
756 EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
757 EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
758 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
759 EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
760 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10
761 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
762 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
763 EXPECT ?job-detailed-status-messages OF-TYPE text IN-GROUP job-attributes-tag
764 EXPECT ?number-of-documents OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
765 EXPECT ?output-device-assigned OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
766 EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
767 EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
768 EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
769 EXPECT job-printer-up-time OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1
770 EXPECT ?date-time-at-creation OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
771 EXPECT ?date-time-at-processing OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
772 EXPECT ?date-time-at-completed OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
773 EXPECT ?number-of-intervening-jobs OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
774 EXPECT ?job-message-from-operator OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
775 EXPECT ?job-k-octets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
776 EXPECT ?job-impressions OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
777 EXPECT ?job-media-sheets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
778 EXPECT ?job-k-octets-processed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
779 EXPECT ?job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
780 EXPECT ?job-media-sheets-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
781
782 EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
783 EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
784 EXPECT ?job-hold-until OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
785 EXPECT ?job-priority OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0,<101
786 EXPECT ?job-sheets OF-TYPE keyword|name IN-GROUP job-attributes-tag
787 EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
788 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)$$/"
789 EXPECT ?number-up OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
790 EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6
791 EXPECT ?pages-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag
792 EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5
793 EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1
794 EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
795 }
796
797
798 # Test Cancel-Job operation
799 #
800 # Required by: RFC 2911 section 3.3.3
801 {
802 NAME "RFC 2911 section 3.3.3: Cancel-Job Operation (completed job)"
803 OPERATION Cancel-Job
804 GROUP operation-attributes-tag
805 ATTR charset attributes-charset utf-8
806 ATTR naturalLanguage attributes-natural-language en
807 ATTR uri printer-uri $uri
808 ATTR integer job-id $job-id
809 ATTR name requesting-user-name $user
810
811 STATUS client-error-not-possible
812 }
813
814
815 # Test Print-Job operation
816 #
817 # Required by: RFC 2911 section 3.2.1
818 {
819 NAME "RFC 2911 section 3.2.1: Print-Job Operation"
820 OPERATION Print-Job
821 GROUP operation-attributes-tag
822 ATTR charset attributes-charset utf-8
823 ATTR naturalLanguage attributes-natural-language en
824 ATTR uri printer-uri $uri
825 ATTR name requesting-user-name $user
826 ATTR name job-name $filename
827 ATTR boolean ipp-attribute-fidelity false
828 ATTR name document-name $filename
829 ATTR keyword compression none
830 ATTR mimeMediaType document-format $filetype
831 FILE $filename
832
833 STATUS successful-ok
834 STATUS client-error-document-format-not-supported
835 STATUS server-error-job-canceled
836 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
837
838 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
839 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
840 WITH-VALUE >0
841 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
842 WITH-VALUE 3,4,5,6,7,8,9
843 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
844 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
845 EXPECT ?number-of-intervening-jobs OF-TYPE integer
846 IN-GROUP job-attributes-tag WITH-VALUE >-1
847 }
848
849
850 # Test Cancel-Job operation
851 #
852 # Required by: RFC 2911 section 3.3.3
853 {
854 NAME "RFC 2911 section 3.3.3: Cancel-Job Operation (pending/processing job)"
855 OPERATION Cancel-Job
856 GROUP operation-attributes-tag
857 ATTR charset attributes-charset utf-8
858 ATTR naturalLanguage attributes-natural-language en
859 ATTR uri printer-uri $uri
860 ATTR integer job-id $job-id
861 ATTR name requesting-user-name $user
862
863 STATUS successful-ok
864 STATUS client-error-not-possible
865 }
866
867
868 # Test Get-Job-Attributes operation
869 #
870 # Required by: RFC 2911 section 3.3.4
871 {
872 NAME "RFC 2911 section 3.3.4: Get-Job-Attributes Operation"
873 OPERATION Get-Job-Attributes
874 GROUP operation-attributes-tag
875 ATTR charset attributes-charset utf-8
876 ATTR naturalLanguage attributes-natural-language en
877 ATTR uri printer-uri $uri
878 ATTR integer job-id $job-id
879 ATTR name requesting-user-name $user
880
881 STATUS successful-ok
882 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
883 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
884 EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
885 EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
886 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
887 EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
888 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10
889 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
890 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
891 EXPECT ?job-detailed-status-messages OF-TYPE text IN-GROUP job-attributes-tag
892 EXPECT ?number-of-documents OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
893 EXPECT ?output-device-assigned OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
894 EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
895 EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
896 EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
897 EXPECT job-printer-up-time OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1
898 EXPECT ?date-time-at-creation OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
899 EXPECT ?date-time-at-processing OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
900 EXPECT ?date-time-at-completed OF-TYPE no-value|dateTime IN-GROUP job-attributes-tag COUNT 1
901 EXPECT ?number-of-intervening-jobs OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
902 EXPECT ?job-message-from-operator OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
903 EXPECT ?job-k-octets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
904 EXPECT ?job-impressions OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
905 EXPECT ?job-media-sheets OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
906 EXPECT ?job-k-octets-processed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
907 EXPECT ?job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
908 EXPECT ?job-media-sheets-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
909
910 EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
911 EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
912 EXPECT ?job-hold-until OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
913 EXPECT ?job-priority OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0,<101
914 EXPECT ?job-sheets OF-TYPE keyword|name IN-GROUP job-attributes-tag
915 EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
916 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)$$/"
917 EXPECT ?number-up OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
918 EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6
919 EXPECT ?pages-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag
920 EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE 3,4,5
921 EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1
922 EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
923 }
924
925
926 # Test Print-URI operation
927 #
928 # Defined by: RFC 2911 section 3.2.2
929 {
930 SKIP-IF-NOT-DEFINED OPTIONAL_PRINT_URI
931 SKIP-IF-NOT-DEFINED document-uri
932
933 NAME "RFC 2911 section 3.2.2: Print-URI Operation"
934 OPERATION Print-URI
935 GROUP operation-attributes-tag
936 ATTR charset attributes-charset utf-8
937 ATTR naturalLanguage attributes-natural-language en
938 ATTR uri printer-uri $uri
939 ATTR name requesting-user-name $user
940 ATTR name job-name $filename
941 ATTR boolean ipp-attribute-fidelity false
942 ATTR name document-name $filename
943 ATTR keyword compression none
944 ATTR uri document-uri $document-uri
945
946 STATUS successful-ok
947 STATUS server-error-job-canceled
948 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
949
950 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
951 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
952 WITH-VALUE >0
953 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
954 WITH-VALUE 3,4,5,6,7,8,9
955 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
956 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
957 EXPECT ?number-of-intervening-jobs OF-TYPE integer
958 IN-GROUP job-attributes-tag WITH-VALUE >-1
959 }
960
961
962 # Test Print-URI operation with bad document-uri
963 #
964 # Defined by: RFC 2911 section 3.2.2
965 {
966 SKIP-IF-NOT-DEFINED OPTIONAL_PRINT_URI
967 SKIP-IF-NOT-DEFINED document-uri
968
969 NAME "Print-URI with bad URI: Print-URI Operation"
970 OPERATION Print-URI
971 GROUP operation-attributes-tag
972 ATTR charset attributes-charset utf-8
973 ATTR naturalLanguage attributes-natural-language en
974 ATTR uri printer-uri $uri
975 ATTR name requesting-user-name $user
976 ATTR name job-name $filename
977 ATTR boolean ipp-attribute-fidelity false
978 ATTR name document-name $filename
979 ATTR keyword compression none
980 ATTR uri document-uri "bogus://bogus"
981
982 STATUS client-error-uri-scheme-not-supported
983
984 EXPECT !job-uri
985 EXPECT !job-id
986 EXPECT !job-state
987 EXPECT !job-state-reasons
988 EXPECT !job-state-message
989 }
990
991
992 # Test Create-Job and Send-Document operations
993 #
994 # Defined by: RFC 2911 section 3.2.4 and 3.3.1
995 {
996 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
997 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_DOCUMENT
998
999 NAME "RFC 2911 section 3.2.4: Create-Job Operation"
1000 OPERATION Create-Job
1001 GROUP operation-attributes-tag
1002 ATTR charset attributes-charset utf-8
1003 ATTR naturalLanguage attributes-natural-language en
1004 ATTR uri printer-uri $uri
1005 ATTR name requesting-user-name $user
1006 ATTR name job-name $filename
1007 ATTR boolean ipp-attribute-fidelity false
1008
1009 STATUS successful-ok
1010
1011 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1012 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1013 WITH-VALUE >0
1014 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1015 WITH-VALUE 3,4,5,6,7,8,9
1016 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1017 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1018 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1019 IN-GROUP job-attributes-tag WITH-VALUE >-1
1020 }
1021
1022 {
1023 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1024 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_DOCUMENT
1025 SKIP-PREVIOUS-ERROR yes
1026
1027 NAME "RFC 2911 section 3.3.1: Send-Document Operation"
1028 OPERATION Send-Document
1029 GROUP operation-attributes-tag
1030 ATTR charset attributes-charset utf-8
1031 ATTR naturalLanguage attributes-natural-language en
1032 ATTR uri printer-uri $uri
1033 ATTR integer job-id $job-id
1034 ATTR name requesting-user-name $user
1035 ATTR boolean last-document true
1036 ATTR name document-name $filename
1037 ATTR keyword compression none
1038 ATTR mimeMediaType document-format $filetype
1039 FILE $filename
1040
1041 STATUS successful-ok
1042 STATUS client-error-document-format-not-supported
1043 STATUS server-error-job-canceled
1044 }
1045
1046 # Test Create-Job and Send-Document operations (no last-document)
1047 #
1048 # Defined by: RFC 2911 section 3.2.4 and 3.3.1
1049 {
1050 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1051 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_DOCUMENT
1052
1053 NAME "Send-Document missing last-document: Create-Job Operation"
1054 OPERATION Create-Job
1055 GROUP operation-attributes-tag
1056 ATTR charset attributes-charset utf-8
1057 ATTR naturalLanguage attributes-natural-language en
1058 ATTR uri printer-uri $uri
1059 ATTR name requesting-user-name $user
1060 ATTR name job-name $filename
1061 ATTR boolean ipp-attribute-fidelity false
1062
1063 STATUS successful-ok
1064
1065 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1066 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1067 WITH-VALUE >0
1068 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1069 WITH-VALUE 3,4,5,6,7,8,9
1070 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1071 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1072 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1073 IN-GROUP job-attributes-tag WITH-VALUE >-1
1074 }
1075
1076 {
1077 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1078 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_DOCUMENT
1079 SKIP-PREVIOUS-ERROR yes
1080
1081 NAME "Send-Document missing last-document: Send-Document Operation"
1082 OPERATION Send-Document
1083 GROUP operation-attributes-tag
1084 ATTR charset attributes-charset utf-8
1085 ATTR naturalLanguage attributes-natural-language en
1086 ATTR uri printer-uri $uri
1087 ATTR integer job-id $job-id
1088 ATTR name requesting-user-name $user
1089 ATTR name document-name $filename
1090 ATTR keyword compression none
1091 ATTR mimeMediaType document-format $filetype
1092 FILE $filename
1093
1094 STATUS client-error-bad-request
1095 }
1096
1097 {
1098 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1099 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_DOCUMENT
1100 SKIP-PREVIOUS-ERROR yes
1101
1102 NAME "RFC 2911 section 3.3.3: Cancel-Job Operation"
1103 OPERATION Cancel-Job
1104 GROUP operation-attributes-tag
1105 ATTR charset attributes-charset utf-8
1106 ATTR naturalLanguage attributes-natural-language en
1107 ATTR uri printer-uri $uri
1108 ATTR integer job-id $job-id
1109 ATTR name requesting-user-name $user
1110
1111 STATUS successful-ok
1112 STATUS server-error-job-canceled
1113 }
1114
1115 # Test Create-Job and Send-URI operations
1116 #
1117 # Defined by: RFC 2911 section 3.2.4 and 3.3.2
1118 {
1119 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1120 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_URI
1121 SKIP-IF-NOT-DEFINED document-uri
1122
1123 NAME "RFC 2911 section 3.2.4: Create-Job Operation"
1124 OPERATION Create-Job
1125 GROUP operation-attributes-tag
1126 ATTR charset attributes-charset utf-8
1127 ATTR naturalLanguage attributes-natural-language en
1128 ATTR uri printer-uri $uri
1129 ATTR name requesting-user-name $user
1130 ATTR name job-name $filename
1131 ATTR boolean ipp-attribute-fidelity false
1132
1133 STATUS successful-ok
1134
1135 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1136 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1137 WITH-VALUE >0
1138 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1139 WITH-VALUE 3,4,5,6,7,8,9
1140 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1141 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1142 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1143 IN-GROUP job-attributes-tag WITH-VALUE >-1
1144 }
1145
1146 {
1147 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1148 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_URI
1149 SKIP-IF-NOT-DEFINED document-uri
1150 SKIP-PREVIOUS-ERROR yes
1151
1152 NAME "RFC 2911 section 3.3.2: Send-URI Operation"
1153 OPERATION Send-URI
1154 GROUP operation-attributes-tag
1155 ATTR charset attributes-charset utf-8
1156 ATTR naturalLanguage attributes-natural-language en
1157 ATTR uri printer-uri $uri
1158 ATTR integer job-id $job-id
1159 ATTR name requesting-user-name $user
1160 ATTR boolean last-document true
1161 ATTR name document-name $filename
1162 ATTR keyword compression none
1163 ATTR uri document-uri $document-uri
1164
1165 STATUS successful-ok
1166 STATUS server-error-job-canceled
1167 }
1168
1169
1170 # Test Create-Job and Send-URI operations (bad URI)
1171 #
1172 # Defined by: RFC 2911 section 3.2.4 and 3.3.2
1173 {
1174 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1175 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_URI
1176
1177 NAME "Send-URI with bad URI: Create-Job Operation"
1178 OPERATION Create-Job
1179 GROUP operation-attributes-tag
1180 ATTR charset attributes-charset utf-8
1181 ATTR naturalLanguage attributes-natural-language en
1182 ATTR uri printer-uri $uri
1183 ATTR name requesting-user-name $user
1184 ATTR name job-name $filename
1185 ATTR boolean ipp-attribute-fidelity false
1186
1187 STATUS successful-ok
1188
1189 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1190 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1191 WITH-VALUE >0
1192 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1193 WITH-VALUE 3,4,5,6,7,8,9
1194 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1195 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1196 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1197 IN-GROUP job-attributes-tag WITH-VALUE >-1
1198 }
1199
1200 {
1201 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1202 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_URI
1203 SKIP-IF-NOT-DEFINED document-uri
1204 SKIP-PREVIOUS-ERROR yes
1205
1206 NAME "Send-URI with bad URI: Send-URI Operation (bad URI)"
1207 OPERATION Send-URI
1208 GROUP operation-attributes-tag
1209 ATTR charset attributes-charset utf-8
1210 ATTR naturalLanguage attributes-natural-language en
1211 ATTR uri printer-uri $uri
1212 ATTR integer job-id $job-id
1213 ATTR name requesting-user-name $user
1214 ATTR boolean last-document true
1215 ATTR name document-name $filename
1216 ATTR keyword compression none
1217 ATTR mimeMediaType document-format $filetype
1218 ATTR uri document-uri "bogus://bogus"
1219
1220 STATUS client-error-uri-scheme-not-supported
1221 }
1222
1223 {
1224 SKIP-IF-NOT-DEFINED OPTIONAL_CREATE_JOB
1225 SKIP-IF-NOT-DEFINED OPTIONAL_SEND_URI
1226 SKIP-PREVIOUS-ERROR yes
1227
1228 NAME "Send-URI with bad URI: Cancel-Job Operation"
1229 OPERATION Cancel-Job
1230 GROUP operation-attributes-tag
1231 ATTR charset attributes-charset utf-8
1232 ATTR naturalLanguage attributes-natural-language en
1233 ATTR uri printer-uri $uri
1234 ATTR integer job-id $job-id
1235 ATTR name requesting-user-name $user
1236
1237 STATUS successful-ok
1238 STATUS server-error-job-canceled
1239 }
1240
1241
1242 # Test multiple copy output
1243 {
1244 SKIP-IF-NOT-DEFINED OPTIONAL_COPIES
1245
1246 NAME "Print-Job with copies"
1247 OPERATION Print-Job
1248 GROUP operation-attributes-tag
1249 ATTR charset attributes-charset utf-8
1250 ATTR naturalLanguage attributes-natural-language en
1251 ATTR uri printer-uri $uri
1252 ATTR name requesting-user-name $user
1253 ATTR name job-name $filename
1254 ATTR boolean ipp-attribute-fidelity false
1255 ATTR name document-name $filename
1256 ATTR keyword compression none
1257 ATTR mimeMediaType document-format $filetype
1258 GROUP job-attributes-tag
1259 ATTR integer copies 2
1260 FILE $filename
1261
1262 STATUS successful-ok
1263 STATUS client-error-document-format-not-supported
1264 STATUS server-error-job-canceled
1265 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1266
1267 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1268 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1269 WITH-VALUE >0
1270 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1271 WITH-VALUE 3,4,5,6,7,8,9
1272 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1273 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1274 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1275 IN-GROUP job-attributes-tag WITH-VALUE >-1
1276 }
1277
1278
1279 # Test PDF output
1280 {
1281 SKIP-IF-DEFINED NOPRINT
1282 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
1283 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1284
1285 NAME "Print-Job with A4 PDF"
1286 OPERATION Print-Job
1287 GROUP operation-attributes-tag
1288 ATTR charset attributes-charset utf-8
1289 ATTR naturalLanguage attributes-natural-language en
1290 ATTR uri printer-uri $uri
1291 ATTR name requesting-user-name $user
1292 ATTR name job-name "A4 Test Document"
1293 ATTR boolean ipp-attribute-fidelity false
1294 ATTR name document-name document-a4.pdf
1295 ATTR keyword compression none
1296 ATTR mimeMediaType document-format application/pdf
1297 GROUP job-attributes-tag
1298 ATTR keyword media $OPTIONAL_A4_MEDIA
1299 FILE document-a4.pdf
1300
1301 STATUS successful-ok
1302 STATUS server-error-job-canceled
1303 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1304
1305 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1306 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1307 WITH-VALUE >0
1308 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1309 WITH-VALUE 3,4,5,6,7,8,9
1310 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1311 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1312 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1313 IN-GROUP job-attributes-tag WITH-VALUE >-1
1314 }
1315
1316 {
1317 SKIP-IF-DEFINED NOPRINT
1318 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
1319 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1320 SKIP-IF-NOT-DEFINED OPTIONAL_DUPLEX
1321
1322 NAME "Print-Job with A4 PDF, Duplex"
1323 OPERATION Print-Job
1324 GROUP operation-attributes-tag
1325 ATTR charset attributes-charset utf-8
1326 ATTR naturalLanguage attributes-natural-language en
1327 ATTR uri printer-uri $uri
1328 ATTR name requesting-user-name $user
1329 ATTR name job-name "A4 Test Document, Duplex"
1330 ATTR boolean ipp-attribute-fidelity false
1331 ATTR name document-name document-a4.pdf
1332 ATTR keyword compression none
1333 ATTR mimeMediaType document-format application/pdf
1334 GROUP job-attributes-tag
1335 ATTR keyword media $OPTIONAL_A4_MEDIA
1336 ATTR keyword sides two-sided-long-edge
1337 FILE document-a4.pdf
1338
1339 STATUS successful-ok
1340 STATUS server-error-job-canceled
1341 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1342
1343 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1344 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1345 WITH-VALUE >0
1346 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1347 WITH-VALUE 3,4,5,6,7,8,9
1348 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1349 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1350 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1351 IN-GROUP job-attributes-tag WITH-VALUE >-1
1352 }
1353
1354 {
1355 SKIP-IF-DEFINED NOPRINT
1356 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
1357 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1358
1359 NAME "Print-Job with US Letter PDF"
1360 OPERATION Print-Job
1361 GROUP operation-attributes-tag
1362 ATTR charset attributes-charset utf-8
1363 ATTR naturalLanguage attributes-natural-language en
1364 ATTR uri printer-uri $uri
1365 ATTR name requesting-user-name $user
1366 ATTR name job-name "US Letter Test Document"
1367 ATTR boolean ipp-attribute-fidelity false
1368 ATTR name document-name document-letter.pdf
1369 ATTR keyword compression none
1370 ATTR mimeMediaType document-format application/pdf
1371 GROUP job-attributes-tag
1372 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1373 FILE document-letter.pdf
1374
1375 STATUS successful-ok
1376 STATUS server-error-job-canceled
1377 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1378
1379 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1380 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1381 WITH-VALUE >0
1382 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1383 WITH-VALUE 3,4,5,6,7,8,9
1384 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1385 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1386 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1387 IN-GROUP job-attributes-tag WITH-VALUE >-1
1388 }
1389
1390 {
1391 SKIP-IF-DEFINED NOPRINT
1392 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
1393 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1394 SKIP-IF-NOT-DEFINED OPTIONAL_DUPLEX
1395
1396 NAME "Print-Job with US Letter PDF, Duplex"
1397 OPERATION Print-Job
1398 GROUP operation-attributes-tag
1399 ATTR charset attributes-charset utf-8
1400 ATTR naturalLanguage attributes-natural-language en
1401 ATTR uri printer-uri $uri
1402 ATTR name requesting-user-name $user
1403 ATTR name job-name "US Letter Test Document, Duplex"
1404 ATTR boolean ipp-attribute-fidelity false
1405 ATTR name document-name document-letter.pdf
1406 ATTR keyword compression none
1407 ATTR mimeMediaType document-format application/pdf
1408 GROUP job-attributes-tag
1409 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1410 ATTR keyword sides two-sided-long-edge
1411 FILE document-letter.pdf
1412
1413 STATUS successful-ok
1414 STATUS server-error-job-canceled
1415 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1416
1417 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1418 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1419 WITH-VALUE >0
1420 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1421 WITH-VALUE 3,4,5,6,7,8,9
1422 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1423 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1424 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1425 IN-GROUP job-attributes-tag WITH-VALUE >-1
1426 }
1427
1428
1429 # Test PostScript output
1430 {
1431 SKIP-IF-DEFINED NOPRINT
1432 SKIP-IF-NOT-DEFINED OPTIONAL_POSTSCRIPT
1433 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1434
1435 NAME "Print-Job with A4 PostScript"
1436 OPERATION Print-Job
1437 GROUP operation-attributes-tag
1438 ATTR charset attributes-charset utf-8
1439 ATTR naturalLanguage attributes-natural-language en
1440 ATTR uri printer-uri $uri
1441 ATTR name requesting-user-name $user
1442 ATTR name job-name "A4 Test Document, Duplex"
1443 ATTR boolean ipp-attribute-fidelity false
1444 ATTR name document-name document-a4.ps
1445 ATTR keyword compression none
1446 ATTR mimeMediaType document-format application/postscript
1447 GROUP job-attributes-tag
1448 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1449 FILE document-a4.ps
1450
1451 STATUS successful-ok
1452 STATUS server-error-job-canceled
1453 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1454
1455 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1456 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1457 WITH-VALUE >0
1458 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1459 WITH-VALUE 3,4,5,6,7,8,9
1460 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1461 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1462 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1463 IN-GROUP job-attributes-tag WITH-VALUE >-1
1464 }
1465
1466 {
1467 SKIP-IF-DEFINED NOPRINT
1468 SKIP-IF-NOT-DEFINED OPTIONAL_POSTSCRIPT
1469 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1470 SKIP-IF-NOT-DEFINED OPTIONAL_DUPLEX
1471
1472 NAME "Print-Job with A4 PostScript, Duplex"
1473 OPERATION Print-Job
1474 GROUP operation-attributes-tag
1475 ATTR charset attributes-charset utf-8
1476 ATTR naturalLanguage attributes-natural-language en
1477 ATTR uri printer-uri $uri
1478 ATTR name requesting-user-name $user
1479 ATTR name job-name "US Letter Test Document"
1480 ATTR boolean ipp-attribute-fidelity false
1481 ATTR name document-name document-a4.ps
1482 ATTR keyword compression none
1483 ATTR mimeMediaType document-format application/postscript
1484 GROUP job-attributes-tag
1485 ATTR keyword media $OPTIONAL_A4_MEDIA
1486 ATTR keyword sides two-sided-long-edge
1487 FILE document-a4.ps
1488
1489 STATUS successful-ok
1490 STATUS server-error-job-canceled
1491 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1492
1493 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1494 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1495 WITH-VALUE >0
1496 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1497 WITH-VALUE 3,4,5,6,7,8,9
1498 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1499 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1500 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1501 IN-GROUP job-attributes-tag WITH-VALUE >-1
1502 }
1503
1504 {
1505 SKIP-IF-DEFINED NOPRINT
1506 SKIP-IF-NOT-DEFINED OPTIONAL_POSTSCRIPT
1507 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1508
1509 NAME "Print-Job with US Letter PostScript"
1510 OPERATION Print-Job
1511 GROUP operation-attributes-tag
1512 ATTR charset attributes-charset utf-8
1513 ATTR naturalLanguage attributes-natural-language en
1514 ATTR uri printer-uri $uri
1515 ATTR name requesting-user-name $user
1516 ATTR name job-name "US Letter Test Document, Duplex"
1517 ATTR boolean ipp-attribute-fidelity false
1518 ATTR name document-name document-letter.ps
1519 ATTR keyword compression none
1520 ATTR mimeMediaType document-format application/postscript
1521 GROUP job-attributes-tag
1522 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1523 FILE document-letter.ps
1524
1525 STATUS successful-ok
1526 STATUS server-error-job-canceled
1527 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1528
1529 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1530 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1531 WITH-VALUE >0
1532 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1533 WITH-VALUE 3,4,5,6,7,8,9
1534 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1535 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1536 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1537 IN-GROUP job-attributes-tag WITH-VALUE >-1
1538 }
1539
1540 {
1541 SKIP-IF-DEFINED NOPRINT
1542 SKIP-IF-NOT-DEFINED OPTIONAL_POSTSCRIPT
1543 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1544 SKIP-IF-NOT-DEFINED OPTIONAL_DUPLEX
1545
1546 NAME "Print-Job with US Letter PostScript, Duplex"
1547 OPERATION Print-Job
1548 GROUP operation-attributes-tag
1549 ATTR charset attributes-charset utf-8
1550 ATTR naturalLanguage attributes-natural-language en
1551 ATTR uri printer-uri $uri
1552 ATTR name requesting-user-name $user
1553 ATTR name job-name "A4 Test Document"
1554 ATTR boolean ipp-attribute-fidelity false
1555 ATTR name document-name document-letter.ps
1556 ATTR keyword compression none
1557 ATTR mimeMediaType document-format application/postscript
1558 GROUP job-attributes-tag
1559 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1560 ATTR keyword sides two-sided-long-edge
1561 FILE document-letter.ps
1562
1563 STATUS successful-ok
1564 STATUS server-error-job-canceled
1565 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1566
1567 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1568 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1569 WITH-VALUE >0
1570 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1571 WITH-VALUE 3,4,5,6,7,8,9
1572 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1573 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1574 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1575 IN-GROUP job-attributes-tag WITH-VALUE >-1
1576 }
1577
1578
1579 # Test JPEG output
1580 {
1581 SKIP-IF-DEFINED NOPRINT
1582 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
1583 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1584
1585 NAME "Print-Job with Color JPEG on A4"
1586 OPERATION Print-Job
1587 GROUP operation-attributes-tag
1588 ATTR charset attributes-charset utf-8
1589 ATTR naturalLanguage attributes-natural-language en
1590 ATTR uri printer-uri $uri
1591 ATTR name requesting-user-name $user
1592 ATTR name job-name "Color JPEG on A4"
1593 ATTR boolean ipp-attribute-fidelity false
1594 ATTR name document-name color.jpg
1595 ATTR keyword compression none
1596 ATTR mimeMediaType document-format image/jpeg
1597 GROUP job-attributes-tag
1598 ATTR keyword media $OPTIONAL_A4_MEDIA
1599 FILE color.jpg
1600
1601 STATUS successful-ok
1602 STATUS server-error-job-canceled
1603 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1604
1605 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1606 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1607 WITH-VALUE >0
1608 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1609 WITH-VALUE 3,4,5,6,7,8,9
1610 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1611 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1612 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1613 IN-GROUP job-attributes-tag WITH-VALUE >-1
1614 }
1615
1616 {
1617 SKIP-IF-DEFINED NOPRINT
1618 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
1619 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1620
1621 NAME "Print-Job with Color JPEG on US Letter"
1622 OPERATION Print-Job
1623 GROUP operation-attributes-tag
1624 ATTR charset attributes-charset utf-8
1625 ATTR naturalLanguage attributes-natural-language en
1626 ATTR uri printer-uri $uri
1627 ATTR name requesting-user-name $user
1628 ATTR name job-name "Color JPEG on US Letter"
1629 ATTR boolean ipp-attribute-fidelity false
1630 ATTR name document-name color.jpg
1631 ATTR keyword compression none
1632 ATTR mimeMediaType document-format image/jpeg
1633 GROUP job-attributes-tag
1634 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1635 FILE color.jpg
1636
1637 STATUS successful-ok
1638 STATUS server-error-job-canceled
1639 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1640
1641 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1642 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1643 WITH-VALUE >0
1644 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1645 WITH-VALUE 3,4,5,6,7,8,9
1646 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1647 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1648 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1649 IN-GROUP job-attributes-tag WITH-VALUE >-1
1650 }
1651
1652 {
1653 SKIP-IF-DEFINED NOPRINT
1654 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
1655 SKIP-IF-NOT-DEFINED OPTIONAL_4X6_MEDIA
1656
1657 NAME "Print-Job with Color JPEG on 4x6"
1658 OPERATION Print-Job
1659 GROUP operation-attributes-tag
1660 ATTR charset attributes-charset utf-8
1661 ATTR naturalLanguage attributes-natural-language en
1662 ATTR uri printer-uri $uri
1663 ATTR name requesting-user-name $user
1664 ATTR name job-name "Color JPEG on 4x6"
1665 ATTR boolean ipp-attribute-fidelity false
1666 ATTR name document-name color.jpg
1667 ATTR keyword compression none
1668 ATTR mimeMediaType document-format image/jpeg
1669 GROUP job-attributes-tag
1670 ATTR keyword media $OPTIONAL_4X6_MEDIA
1671 FILE color.jpg
1672
1673 STATUS successful-ok
1674 STATUS server-error-job-canceled
1675 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1676
1677 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1678 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1679 WITH-VALUE >0
1680 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1681 WITH-VALUE 3,4,5,6,7,8,9
1682 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1683 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1684 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1685 IN-GROUP job-attributes-tag WITH-VALUE >-1
1686 }
1687
1688 {
1689 SKIP-IF-DEFINED NOPRINT
1690 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
1691 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1692
1693 NAME "Print-Job with Grayscale JPEG on A4"
1694 OPERATION Print-Job
1695 GROUP operation-attributes-tag
1696 ATTR charset attributes-charset utf-8
1697 ATTR naturalLanguage attributes-natural-language en
1698 ATTR uri printer-uri $uri
1699 ATTR name requesting-user-name $user
1700 ATTR name job-name "Grayscale JPEG on A4"
1701 ATTR boolean ipp-attribute-fidelity false
1702 ATTR name document-name gray.jpg
1703 ATTR keyword compression none
1704 ATTR mimeMediaType document-format image/jpeg
1705 GROUP job-attributes-tag
1706 ATTR keyword media $OPTIONAL_A4_MEDIA
1707 FILE gray.jpg
1708
1709 STATUS successful-ok
1710 STATUS server-error-job-canceled
1711 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1712
1713 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1714 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1715 WITH-VALUE >0
1716 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1717 WITH-VALUE 3,4,5,6,7,8,9
1718 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1719 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1720 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1721 IN-GROUP job-attributes-tag WITH-VALUE >-1
1722 }
1723
1724 {
1725 SKIP-IF-DEFINED NOPRINT
1726 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
1727 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1728
1729 NAME "Print-Job with Grayscale JPEG on US Letter"
1730 OPERATION Print-Job
1731 GROUP operation-attributes-tag
1732 ATTR charset attributes-charset utf-8
1733 ATTR naturalLanguage attributes-natural-language en
1734 ATTR uri printer-uri $uri
1735 ATTR name requesting-user-name $user
1736 ATTR name job-name "Grayscale JPEG on US Letter"
1737 ATTR boolean ipp-attribute-fidelity false
1738 ATTR name document-name gray.jpg
1739 ATTR keyword compression none
1740 ATTR mimeMediaType document-format image/jpeg
1741 GROUP job-attributes-tag
1742 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1743 FILE gray.jpg
1744
1745 STATUS successful-ok
1746 STATUS server-error-job-canceled
1747 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1748
1749 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1750 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1751 WITH-VALUE >0
1752 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1753 WITH-VALUE 3,4,5,6,7,8,9
1754 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1755 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1756 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1757 IN-GROUP job-attributes-tag WITH-VALUE >-1
1758 }
1759
1760 {
1761 SKIP-IF-DEFINED NOPRINT
1762 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
1763 SKIP-IF-NOT-DEFINED OPTIONAL_4X6_MEDIA
1764
1765 NAME "Print-Job with Grayscale JPEG on 4x6"
1766 OPERATION Print-Job
1767 GROUP operation-attributes-tag
1768 ATTR charset attributes-charset utf-8
1769 ATTR naturalLanguage attributes-natural-language en
1770 ATTR uri printer-uri $uri
1771 ATTR name requesting-user-name $user
1772 ATTR name job-name "Grayscale JPEG on 4x6"
1773 ATTR boolean ipp-attribute-fidelity false
1774 ATTR name document-name gray.jpg
1775 ATTR keyword compression none
1776 ATTR mimeMediaType document-format image/jpeg
1777 GROUP job-attributes-tag
1778 ATTR keyword media $OPTIONAL_4X6_MEDIA
1779 FILE gray.jpg
1780
1781 STATUS successful-ok
1782 STATUS server-error-job-canceled
1783 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1784
1785 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1786 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1787 WITH-VALUE >0
1788 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1789 WITH-VALUE 3,4,5,6,7,8,9
1790 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1791 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1792 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1793 IN-GROUP job-attributes-tag WITH-VALUE >-1
1794 }
1795
1796
1797 # Print-Job with job-sheets
1798 {
1799 SKIP-IF-DEFINED NOPRINT
1800 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
1801 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1802 SKIP-IF-NOT-DEFINED OPTIONAL_STANDARD_SHEET
1803
1804 NAME "Print-Job with A4 PDF and Standard Sheet"
1805 OPERATION Print-Job
1806 GROUP operation-attributes-tag
1807 ATTR charset attributes-charset utf-8
1808 ATTR naturalLanguage attributes-natural-language en
1809 ATTR uri printer-uri $uri
1810 ATTR name requesting-user-name $user
1811 ATTR name job-name "A4 Test Document w/Standard Sheet"
1812 ATTR boolean ipp-attribute-fidelity false
1813 ATTR name document-name document-a4.pdf
1814 ATTR keyword compression none
1815 ATTR mimeMediaType document-format application/pdf
1816 GROUP job-attributes-tag
1817 ATTR keyword media $OPTIONAL_A4_MEDIA
1818 ATTR keyword job-sheets standard
1819 FILE document-a4.pdf
1820
1821 STATUS successful-ok
1822 STATUS server-error-job-canceled
1823 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1824
1825 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1826 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1827 WITH-VALUE >0
1828 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1829 WITH-VALUE 3,4,5,6,7,8,9
1830 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1831 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1832 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1833 IN-GROUP job-attributes-tag WITH-VALUE >-1
1834 }
1835
1836 {
1837 SKIP-IF-DEFINED NOPRINT
1838 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
1839 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1840 SKIP-IF-NOT-DEFINED OPTIONAL_STANDARD_SHEET
1841
1842 NAME "Print-Job with US Letter PDF and Standard Sheet"
1843 OPERATION Print-Job
1844 GROUP operation-attributes-tag
1845 ATTR charset attributes-charset utf-8
1846 ATTR naturalLanguage attributes-natural-language en
1847 ATTR uri printer-uri $uri
1848 ATTR name requesting-user-name $user
1849 ATTR name job-name "US Letter Test Document w/Standard Sheet"
1850 ATTR boolean ipp-attribute-fidelity false
1851 ATTR name document-name document-a4.pdf
1852 ATTR keyword compression none
1853 ATTR mimeMediaType document-format application/pdf
1854 GROUP job-attributes-tag
1855 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1856 ATTR keyword job-sheets standard
1857 FILE document-a4.pdf
1858
1859 STATUS successful-ok
1860 STATUS server-error-job-canceled
1861 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1862
1863 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1864 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1865 WITH-VALUE >0
1866 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1867 WITH-VALUE 3,4,5,6,7,8,9
1868 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1869 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1870 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1871 IN-GROUP job-attributes-tag WITH-VALUE >-1
1872 }
1873
1874 {
1875 SKIP-IF-DEFINED NOPRINT
1876 SKIP-IF-NOT-DEFINED OPTIONAL_POSTSCRIPT
1877 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1878 SKIP-IF-NOT-DEFINED OPTIONAL_STANDARD_SHEET
1879
1880 NAME "Print-Job with A4 PDF and Standard Sheet"
1881 OPERATION Print-Job
1882 GROUP operation-attributes-tag
1883 ATTR charset attributes-charset utf-8
1884 ATTR naturalLanguage attributes-natural-language en
1885 ATTR uri printer-uri $uri
1886 ATTR name requesting-user-name $user
1887 ATTR name job-name "A4 Test Document w/Standard Sheet"
1888 ATTR boolean ipp-attribute-fidelity false
1889 ATTR name document-name document-a4.ps
1890 ATTR keyword compression none
1891 ATTR mimeMediaType document-format application/postscript
1892 GROUP job-attributes-tag
1893 ATTR keyword media $OPTIONAL_A4_MEDIA
1894 ATTR keyword job-sheets standard
1895 FILE document-a4.ps
1896
1897 STATUS successful-ok
1898 STATUS server-error-job-canceled
1899 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1900
1901 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1902 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1903 WITH-VALUE >0
1904 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1905 WITH-VALUE 3,4,5,6,7,8,9
1906 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1907 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1908 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1909 IN-GROUP job-attributes-tag WITH-VALUE >-1
1910 }
1911
1912 {
1913 SKIP-IF-DEFINED NOPRINT
1914 SKIP-IF-NOT-DEFINED OPTIONAL_POSTSCRIPT
1915 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1916 SKIP-IF-NOT-DEFINED OPTIONAL_STANDARD_SHEET
1917
1918 NAME "Print-Job with US Letter PDF and Standard Sheet"
1919 OPERATION Print-Job
1920 GROUP operation-attributes-tag
1921 ATTR charset attributes-charset utf-8
1922 ATTR naturalLanguage attributes-natural-language en
1923 ATTR uri printer-uri $uri
1924 ATTR name requesting-user-name $user
1925 ATTR name job-name "US Letter Test Document w/Standard Sheet"
1926 ATTR boolean ipp-attribute-fidelity false
1927 ATTR name document-name document-a4.ps
1928 ATTR keyword compression none
1929 ATTR mimeMediaType document-format application/postscript
1930 GROUP job-attributes-tag
1931 ATTR keyword media $OPTIONAL_LETTER_MEDIA
1932 ATTR keyword job-sheets standard
1933 FILE document-a4.ps
1934
1935 STATUS successful-ok
1936 STATUS server-error-job-canceled
1937 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1938
1939 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1940 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1941 WITH-VALUE >0
1942 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1943 WITH-VALUE 3,4,5,6,7,8,9
1944 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1945 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1946 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1947 IN-GROUP job-attributes-tag WITH-VALUE >-1
1948 }
1949
1950
1951 # Test number-up output
1952 {
1953 SKIP-IF-DEFINED NOPRINT
1954 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
1955 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
1956 SKIP-IF-NOT-DEFINED OPTIONAL_2UP
1957
1958 NAME "Print-Job with A4 PDF, 2-Up"
1959 OPERATION Print-Job
1960 GROUP operation-attributes-tag
1961 ATTR charset attributes-charset utf-8
1962 ATTR naturalLanguage attributes-natural-language en
1963 ATTR uri printer-uri $uri
1964 ATTR name requesting-user-name $user
1965 ATTR name job-name "A4 Test Document; 2-Up"
1966 ATTR boolean ipp-attribute-fidelity false
1967 ATTR name document-name document-a4.pdf
1968 ATTR keyword compression none
1969 ATTR mimeMediaType document-format application/pdf
1970 GROUP job-attributes-tag
1971 ATTR keyword media $OPTIONAL_A4_MEDIA
1972 ATTR integer number-up 2
1973 FILE document-a4.pdf
1974
1975 STATUS successful-ok
1976 STATUS server-error-job-canceled
1977 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1978
1979 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1980 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
1981 WITH-VALUE >0
1982 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
1983 WITH-VALUE 3,4,5,6,7,8,9
1984 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1985 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1986 EXPECT ?number-of-intervening-jobs OF-TYPE integer
1987 IN-GROUP job-attributes-tag WITH-VALUE >-1
1988 }
1989
1990 {
1991 SKIP-IF-DEFINED NOPRINT
1992 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
1993 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
1994 SKIP-IF-NOT-DEFINED OPTIONAL_2UP
1995
1996 NAME "Print-Job with US Letter PDF, 2-Up"
1997 OPERATION Print-Job
1998 GROUP operation-attributes-tag
1999 ATTR charset attributes-charset utf-8
2000 ATTR naturalLanguage attributes-natural-language en
2001 ATTR uri printer-uri $uri
2002 ATTR name requesting-user-name $user
2003 ATTR name job-name "US Letter Test Document; 2-Up"
2004 ATTR boolean ipp-attribute-fidelity false
2005 ATTR name document-name document-letter.pdf
2006 ATTR keyword compression none
2007 ATTR mimeMediaType document-format application/pdf
2008 GROUP job-attributes-tag
2009 ATTR keyword media $OPTIONAL_LETTER_MEDIA
2010 ATTR integer number-up 2
2011 FILE document-letter.pdf
2012
2013 STATUS successful-ok
2014 STATUS server-error-job-canceled
2015 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2016
2017 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2018 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2019 WITH-VALUE >0
2020 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2021 WITH-VALUE 3,4,5,6,7,8,9
2022 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2023 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2024 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2025 IN-GROUP job-attributes-tag WITH-VALUE >-1
2026 }
2027
2028 {
2029 SKIP-IF-DEFINED NOPRINT
2030 SKIP-IF-NOT-DEFINED OPTIONAL_POSTSCRIPT
2031 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
2032 SKIP-IF-NOT-DEFINED OPTIONAL_2UP
2033
2034 NAME "Print-Job with A4 PDF, 2-Up"
2035 OPERATION Print-Job
2036 GROUP operation-attributes-tag
2037 ATTR charset attributes-charset utf-8
2038 ATTR naturalLanguage attributes-natural-language en
2039 ATTR uri printer-uri $uri
2040 ATTR name requesting-user-name $user
2041 ATTR name job-name "A4 Test Document; 2-Up"
2042 ATTR boolean ipp-attribute-fidelity false
2043 ATTR name document-name document-a4.ps
2044 ATTR keyword compression none
2045 ATTR mimeMediaType document-format application/postscript
2046 GROUP job-attributes-tag
2047 ATTR keyword media $OPTIONAL_A4_MEDIA
2048 ATTR integer number-up 2
2049 FILE document-a4.ps
2050
2051 STATUS successful-ok
2052 STATUS server-error-job-canceled
2053 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2054
2055 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2056 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2057 WITH-VALUE >0
2058 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2059 WITH-VALUE 3,4,5,6,7,8,9
2060 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2061 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2062 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2063 IN-GROUP job-attributes-tag WITH-VALUE >-1
2064 }
2065
2066 {
2067 SKIP-IF-DEFINED NOPRINT
2068 SKIP-IF-NOT-DEFINED OPTIONAL_POSTSCRIPT
2069 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
2070 SKIP-IF-NOT-DEFINED OPTIONAL_2UP
2071
2072 NAME "Print-Job with US Letter PDF, 2-Up"
2073 OPERATION Print-Job
2074 GROUP operation-attributes-tag
2075 ATTR charset attributes-charset utf-8
2076 ATTR naturalLanguage attributes-natural-language en
2077 ATTR uri printer-uri $uri
2078 ATTR name requesting-user-name $user
2079 ATTR name job-name "US Letter Test Document; 2-Up"
2080 ATTR boolean ipp-attribute-fidelity false
2081 ATTR name document-name document-letter.ps
2082 ATTR keyword compression none
2083 ATTR mimeMediaType document-format application/postscript
2084 GROUP job-attributes-tag
2085 ATTR keyword media $OPTIONAL_LETTER_MEDIA
2086 ATTR integer number-up 2
2087 FILE document-letter.ps
2088
2089 STATUS successful-ok
2090 STATUS server-error-job-canceled
2091 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2092
2093 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2094 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2095 WITH-VALUE >0
2096 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2097 WITH-VALUE 3,4,5,6,7,8,9
2098 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2099 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2100 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2101 IN-GROUP job-attributes-tag WITH-VALUE >-1
2102 }
2103
2104
2105 # Test output with print-quality...
2106 {
2107 SKIP-IF-DEFINED NOPRINT
2108 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
2109 SKIP-IF-NOT-DEFINED OPTIONAL_4X6_MEDIA
2110 SKIP-IF-NOT-DEFINED OPTIONAL_DRAFT_QUALITY
2111
2112 NAME "Print-Job with JPEG on 4x6, Draft Quality"
2113 OPERATION Print-Job
2114 GROUP operation-attributes-tag
2115 ATTR charset attributes-charset utf-8
2116 ATTR naturalLanguage attributes-natural-language en
2117 ATTR uri printer-uri $uri
2118 ATTR name requesting-user-name $user
2119 ATTR name job-name "4x6 Color JPEG; Draft Quality"
2120 ATTR boolean ipp-attribute-fidelity false
2121 ATTR name document-name color.jpg
2122 ATTR keyword compression none
2123 ATTR mimeMediaType document-format image/jpeg
2124 GROUP job-attributes-tag
2125 ATTR keyword media $OPTIONAL_4X6_MEDIA
2126 ATTR enum print-quality 3
2127 FILE color.jpg
2128
2129 STATUS successful-ok
2130 STATUS server-error-job-canceled
2131 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2132
2133 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2134 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2135 WITH-VALUE >0
2136 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2137 WITH-VALUE 3,4,5,6,7,8,9
2138 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2139 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2140 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2141 IN-GROUP job-attributes-tag WITH-VALUE >-1
2142 }
2143
2144 {
2145 SKIP-IF-DEFINED NOPRINT
2146 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
2147 SKIP-IF-NOT-DEFINED OPTIONAL_4X6_MEDIA
2148 SKIP-IF-NOT-DEFINED OPTIONAL_NORMAL_QUALITY
2149
2150 NAME "Print-Job with JPEG on 4x6, Normal Quality"
2151 OPERATION Print-Job
2152 GROUP operation-attributes-tag
2153 ATTR charset attributes-charset utf-8
2154 ATTR naturalLanguage attributes-natural-language en
2155 ATTR uri printer-uri $uri
2156 ATTR name requesting-user-name $user
2157 ATTR name job-name "4x6 Color JPEG; Normal Quality"
2158 ATTR boolean ipp-attribute-fidelity false
2159 ATTR name document-name color.jpg
2160 ATTR keyword compression none
2161 ATTR mimeMediaType document-format image/jpeg
2162 GROUP job-attributes-tag
2163 ATTR keyword media $OPTIONAL_4X6_MEDIA
2164 ATTR enum print-quality 4
2165 FILE color.jpg
2166
2167 STATUS successful-ok
2168 STATUS server-error-job-canceled
2169 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2170
2171 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2172 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2173 WITH-VALUE >0
2174 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2175 WITH-VALUE 3,4,5,6,7,8,9
2176 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2177 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2178 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2179 IN-GROUP job-attributes-tag WITH-VALUE >-1
2180 }
2181
2182 {
2183 SKIP-IF-DEFINED NOPRINT
2184 SKIP-IF-NOT-DEFINED OPTIONAL_JPEG
2185 SKIP-IF-NOT-DEFINED OPTIONAL_4X6_MEDIA
2186 SKIP-IF-NOT-DEFINED OPTIONAL_HIGH_QUALITY
2187
2188 NAME "Print-Job with JPEG on 4x6, High Quality"
2189 OPERATION Print-Job
2190 GROUP operation-attributes-tag
2191 ATTR charset attributes-charset utf-8
2192 ATTR naturalLanguage attributes-natural-language en
2193 ATTR uri printer-uri $uri
2194 ATTR name requesting-user-name $user
2195 ATTR name job-name "4x6 Color JPEG; High Quality"
2196 ATTR boolean ipp-attribute-fidelity false
2197 ATTR name document-name color.jpg
2198 ATTR keyword compression none
2199 ATTR mimeMediaType document-format image/jpeg
2200 GROUP job-attributes-tag
2201 ATTR keyword media $OPTIONAL_4X6_MEDIA
2202 ATTR enum print-quality 5
2203 FILE color.jpg
2204
2205 STATUS successful-ok
2206 STATUS server-error-job-canceled
2207 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2208
2209 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2210 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2211 WITH-VALUE >0
2212 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2213 WITH-VALUE 3,4,5,6,7,8,9
2214 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2215 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2216 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2217 IN-GROUP job-attributes-tag WITH-VALUE >-1
2218 }
2219
2220 {
2221 SKIP-IF-DEFINED NOPRINT
2222 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
2223 SKIP-IF-NOT-DEFINED OPTIONAL_A4_MEDIA
2224 SKIP-IF-NOT-DEFINED OPTIONAL_DRAFT_QUALITY
2225
2226 NAME "Print-Job with A4 PDF, Draft Quality"
2227 OPERATION Print-Job
2228 GROUP operation-attributes-tag
2229 ATTR charset attributes-charset utf-8
2230 ATTR naturalLanguage attributes-natural-language en
2231 ATTR uri printer-uri $uri
2232 ATTR name requesting-user-name $user
2233 ATTR name job-name "A4 Test Document; 2-Up"
2234 ATTR boolean ipp-attribute-fidelity false
2235 ATTR name document-name document-a4.pdf
2236 ATTR keyword compression none
2237 ATTR mimeMediaType document-format application/pdf
2238 GROUP job-attributes-tag
2239 ATTR keyword media $OPTIONAL_A4_MEDIA
2240 ATTR enum print-quality 3
2241 FILE document-a4.pdf
2242
2243 STATUS successful-ok
2244 STATUS server-error-job-canceled
2245 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2246
2247 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2248 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2249 WITH-VALUE >0
2250 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2251 WITH-VALUE 3,4,5,6,7,8,9
2252 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2253 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2254 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2255 IN-GROUP job-attributes-tag WITH-VALUE >-1
2256 }
2257
2258 {
2259 SKIP-IF-DEFINED NOPRINT
2260 SKIP-IF-NOT-DEFINED OPTIONAL_PDF
2261 SKIP-IF-NOT-DEFINED OPTIONAL_LETTER_MEDIA
2262 SKIP-IF-NOT-DEFINED OPTIONAL_DRAFT_QUALITY
2263
2264 NAME "Print-Job with US Letter PDF, Draft Quality"
2265 OPERATION Print-Job
2266 GROUP operation-attributes-tag
2267 ATTR charset attributes-charset utf-8
2268 ATTR naturalLanguage attributes-natural-language en
2269 ATTR uri printer-uri $uri
2270 ATTR name requesting-user-name $user
2271 ATTR name job-name "US Letter Test Document; 2-Up"
2272 ATTR boolean ipp-attribute-fidelity false
2273 ATTR name document-name document-letter.pdf
2274 ATTR keyword compression none
2275 ATTR mimeMediaType document-format application/pdf
2276 GROUP job-attributes-tag
2277 ATTR keyword media $OPTIONAL_LETTER_MEDIA
2278 ATTR enum print-quality 3
2279 FILE document-letter.pdf
2280
2281 STATUS successful-ok
2282 STATUS server-error-job-canceled
2283 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2284
2285 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2286 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2287 WITH-VALUE >0
2288 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2289 WITH-VALUE 3,4,5,6,7,8,9
2290 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2291 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2292 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2293 IN-GROUP job-attributes-tag WITH-VALUE >-1
2294 }
2295
2296
2297 # Test hold/release in the context of Print-Job w/job-hold-until + Release-Job
2298 {
2299 SKIP-IF-NOT-DEFINED OPTIONAL_HOLD_JOB
2300
2301 NAME "Print-Job with job-hold-until"
2302 OPERATION Print-Job
2303 GROUP operation-attributes-tag
2304 ATTR charset attributes-charset utf-8
2305 ATTR naturalLanguage attributes-natural-language en
2306 ATTR uri printer-uri $uri
2307 ATTR name requesting-user-name $user
2308 ATTR name job-name "Test Document w/Hold"
2309 ATTR name document-name $filename
2310 ATTR keyword compression none
2311 ATTR mimeMediaType document-format $filetype
2312 GROUP job-attributes-tag
2313 ATTR keyword job-hold-until indefinite
2314 FILE $filename
2315
2316 STATUS successful-ok
2317 STATUS server-error-job-canceled
2318 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
2319
2320 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
2321 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
2322 WITH-VALUE >0
2323 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag
2324 WITH-VALUE 3,4,5,6,7,8,9
2325 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
2326 EXPECT ?job-state-message OF-TYPE text IN-GROUP job-attributes-tag
2327 EXPECT ?number-of-intervening-jobs OF-TYPE integer
2328 IN-GROUP job-attributes-tag WITH-VALUE >-1
2329 }
2330
2331 {
2332 SKIP-IF-NOT-DEFINED OPTIONAL_HOLD_JOB
2333
2334 NAME "Release-Job"
2335 OPERATION Release-Job
2336 GROUP operation-attributes-tag
2337 ATTR charset attributes-charset utf-8
2338 ATTR naturalLanguage attributes-natural-language en
2339 ATTR uri printer-uri $uri
2340 ATTR integer job-id $job-id
2341 ATTR name requesting-user-name $user
2342
2343 STATUS successful-ok
2344 STATUS client-error-not-possible
2345 }
2346
2347
2348 #
2349 # End of "$Id: ipp-1.1.test 12663 2015-05-25 14:32:17Z msweet $".
2350 #