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