2 # "$Id: ipp-tests.test 13138 2016-03-15 14:59:54Z msweet $"
4 # IPP Everywhere Printer Self-Certification Manual 1.0: Section 6: IPP Tests.
6 # Copyright 2014-2015 by The Printer Working Group.
7 # Copyright 2007-2013 by Apple Inc.
8 # Copyright 2001-2006 by Easy Software Products. All rights reserved.
10 # These coded instructions, statements, and computer programs are the
11 # property of Apple Inc. and are protected by Federal copyright
12 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
13 # which should have been included with this file. If this file is
14 # file is missing or damaged, see the license at "http://www.cups.org/".
18 # ./ipptool -tI printer-uri ipp-tests.test
22 # This test file is loosely based on the IPP/1.1, IPP/2.0 and IPP Everywhere
23 # test files from the CUPS "test" directory. Many of those tests have been
24 # combined or removed, and all print tests are performed using a sample JPEG
25 # file. These tests also validate support for the 'media-empty' and
26 # 'media-needed' keywords in the "printer-state-reasons" Printer attribute.
29 FILE-ID "org.pwg.ipp-everywhere.20151009.ipp"
31 # All tests use IPP version 2.0, unless overridden in a test...
34 # Regular expressions for URI schemes:
36 # HTTP_URI_SCHEME - Matches strings beginning with http:// or https://
37 # IPP_URI_SCHEME - Matches strings beginning with ipp:// or ipps://
38 # UUID_URI - Matches UUID URN strings.
40 DEFINE HTTP_URI_SCHEME "/^https?://.+$$/"
41 DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/"
42 DEFINE LINK_LOCAL "/^(\[|\[v1.)fe80:/"
43 DEFINE UUID_URI "/^urn:uuid:[0-9A-Fa-f]{8,8}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{12,12}/"
45 # Regular expression for PWG media size names (eek!)
47 # Generated with help from: http://www.msweet.org/abnf.php
48 DEFINE MEDIA_REGEX "/^(choice(_((custom|na|asme|roc|oe|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)){2,}|(custom|na|asme|roc|oe|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)$$/"
50 # Regular expression for printer-alert attribute
52 # Generated with help from: http://www.msweet.org/abnf.php
53 DEFINE ALERT_REGEX "/^code\=[A-Za-z]+(;(index\=[0-9]+|severity\=[A-Za-z]+|training\=[A-Za-z]+|group\=[A-Za-z]+|groupindex\=[0-9]+|location\=[0-9]+|time\=[0-9]+)){0,1}$$/"
55 # Regular expression for printer-supply attribute
57 # Generated with help from: http://www.msweet.org/abnf.php
58 DEFINE SUPPLY_REGEX "/^(type\=[A-Za-z]+|(maxcapacity\=([0-9]|\-){0,1})(level\=([0-9]|\-){0,1})|);*((index\=[0-9]+|markerindex\=[0-9]+|class\=[A-Za-z]+|unit\=[A-Za-z]+|colorantindex\=[0-9]+|colorantrole\=[A-Za-z]+|colorantname\=[A-Za-z]+|coloranttonality\=[0-9]+);){0,1}$$/"
60 # Test that a request-id value of 0 is not accepted.
62 # Required by: RFC 2911 section 3.1.1
64 NAME "I-1. RFC 2911 section 3.1.1: Bad request-id value 0"
66 OPERATION Get-Printer-Attributes
67 GROUP operation-attributes-tag
68 ATTR charset attributes-charset utf-8
69 ATTR naturalLanguage attributes-natural-language en
70 ATTR uri printer-uri $uri
72 STATUS client-error-bad-request
73 EXPECT !printer-uri-supported
77 # Test that the first two attributes must be attributes-charset and
78 # attributes-natural-language.
80 # Required by: RFC 2911 section 3.1.4
82 NAME "I-2. RFC 2911 section 3.1.4: No Operation Attributes"
84 OPERATION Get-Printer-Attributes
85 GROUP operation-attributes-tag
87 STATUS client-error-bad-request
88 EXPECT !printer-uri-supported
91 NAME "I-3. RFC 2911 section 3.1.4: attributes-charset"
92 OPERATION Get-Printer-Attributes
93 GROUP operation-attributes-tag
94 ATTR charset attributes-charset utf-8
95 ATTR uri printer-uri $uri
97 STATUS client-error-bad-request
98 EXPECT !printer-uri-supported
101 NAME "I-4. RFC 2911 section 3.1.4: attributes-natural-language"
102 OPERATION Get-Printer-Attributes
103 GROUP operation-attributes-tag
104 ATTR naturalLanguage attributes-natural-language en
105 ATTR uri printer-uri $uri
107 STATUS client-error-bad-request
108 EXPECT !printer-uri-supported
111 NAME "I-5. RFC 2911 section 3.1.4: attributes-natural-language + attributes-charset"
112 OPERATION Get-Printer-Attributes
113 GROUP operation-attributes-tag
114 ATTR naturalLanguage attributes-natural-language en
115 ATTR charset attributes-charset utf-8
116 ATTR uri printer-uri $uri
118 STATUS client-error-bad-request
119 EXPECT !printer-uri-supported
122 NAME "I-6. RFC 2911 section 3.1.4: attributes-charset + attributes-natural-language"
123 OPERATION Get-Printer-Attributes
124 GROUP operation-attributes-tag
125 ATTR charset attributes-charset utf-8
126 ATTR naturalLanguage attributes-natural-language en
127 ATTR uri printer-uri $uri
130 EXPECT printer-uri-supported OF-TYPE uri WITH-ALL-VALUES "$IPP_URI_SCHEME"
134 # Test that bad IPP versions are not supported.
136 # Required by: RFC 2911 section 3.1.8
138 # The name of the test...
139 NAME "I-7. RFC 2911 section 3.1.8: Unsupported IPP version 0.0"
141 OPERATION Get-Printer-Attributes
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
147 STATUS server-error-version-not-supported
148 EXPECT !printer-uri-supported
152 # Test that printer operations require the printer-uri operation attribute.
154 # Required by: RFC 2911 section 3.2
156 NAME "I-8. RFC 2911 section 3.2: No printer-uri operation attribute"
157 OPERATION Get-Printer-Attributes
158 GROUP operation-attributes-tag
159 ATTR charset attributes-charset utf-8
160 ATTR naturalLanguage attributes-natural-language en
162 STATUS client-error-bad-request
163 EXPECT !printer-uri-supported
167 # Test Get-Printer-Attributes operation
169 # Required by: PWG 5100.14 Section 5.x
171 NAME "I-9. Get-Printer-Attributes Operation (default)"
172 OPERATION Get-Printer-Attributes
173 GROUP operation-attributes-tag
174 ATTR charset attributes-charset utf-8
175 ATTR naturalLanguage attributes-natural-language en
176 ATTR uri printer-uri $uri
177 ATTR name requesting-user-name $user
181 # PWG 5100.14 - Table 5 - Operations
182 EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0002 # Print-Job
183 EXPECT operations-supported WITH-VALUE 0x0004 # Validate-Job
184 EXPECT operations-supported WITH-VALUE 0x0005 # Create-Job
185 EXPECT operations-supported WITH-VALUE 0x0006 # Send-Document
186 EXPECT operations-supported WITH-VALUE 0x0008 # Cancel-Job
187 EXPECT operations-supported WITH-VALUE 0x0009 # Get-Job-Attributes
188 EXPECT operations-supported WITH-VALUE 0x000a # Get-Jobs
189 EXPECT operations-supported WITH-VALUE 0x000b # Get-Printer-Attributes
190 EXPECT operations-supported WITH-VALUE 0x0039 # Cancel-My-Jobs
191 EXPECT operations-supported WITH-VALUE 0x003b # Close-Job
192 EXPECT operations-supported WITH-VALUE 0x003c # Identify-Printer
194 # PWG 5100.14 - Table 6 - Printer Description Attributes
195 EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag COUNT 1
197 EXPECT charset-supported OF-TYPE charset IN-GROUP printer-attributes-tag WITH-VALUE utf-8
199 EXPECT color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
200 EXPECT color-supported WITH-VALUE true DEFINE-MATCH HAVE_COLOR
202 EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "none"
203 EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "deflate" DEFINE-MATCH HAVE_DEFLATE
204 EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "gzip" DEFINE-MATCH HAVE_GZIP
206 EXPECT copies-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
207 EXPECT copies-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag
209 EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag COUNT 1
210 EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/jpeg"
211 EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/pwg-raster"
212 EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "application/pdf" DEFINE-MATCH HAVE_PDF
214 EXPECT document-password-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_PDF
216 EXPECT feed-orientation-supported OF-TYPE keyword IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_FEED_ORIENTATION
217 EXPECT feed-orientation-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_FEED_ORIENTATION
219 EXPECT finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3 DEFINE-MATCH HAVE_FINISHINGS
220 EXPECT finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag IF-DEFINED HAVE_FINISHINGS
222 EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag
224 EXPECT identify-actions-default OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(display|flash|sound|speak)$/"
225 EXPECT identify-actions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(display|flash|sound|speak)$/"
227 EXPECT ipp-features-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "ipp-everywhere"
229 EXPECT ipp-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "2.0"
231 EXPECT job-account-id-supported OF-TYPE boolean IN-GROUP printer-attributes-tag WITH-VALUE true COUNT 1 DEFINE-MATCH HAVE_JOB_ACCOUNT_ID
232 EXPECT job-account-id-default OF-TYPE name|no-value IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_JOB_ACCOUNT_ID
234 EXPECT job-accounting-user-id-supported OF-TYPE boolean IN-GROUP printer-attributes-tag WITH-VALUE true COUNT 1 DEFINE-MATCH HAVE_JOB_ACCOUNTING_USER_ID
235 EXPECT job-accounting-user-id-default OF-TYPE name|no-value IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_JOB_ACCOUNTING_USER_ID
237 EXPECT job-constraints-supported OF-TYPE collection IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_JOB_CONSTRAINTS
239 EXPECT job-creation-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(media|print-color-mode)$$/"
241 EXPECT job-ids-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true
243 # TODO: Make job-password-xxx conditionally required
244 EXPECT ?job-password-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
245 EXPECT ?job-password-encryption-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
247 EXPECT preferred-attributes-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
249 EXPECT job-resolvers-supported OF-TYPE collection IN-GROUP printer-attributes-tag IF-DEFINED HAVE_JOB_CONSTRAINTS
251 EXPECT media-bottom-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
253 # Default Get-Printer-Attributes MUST NOT return media-col-database, per PWG 5100.11 (JPS2)
254 EXPECT !media-col-database OF-TYPE collection IN-GROUP printer-attributes-tag
256 EXPECT media-source-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_MEDIA_SOURCE
258 EXPECT media-type-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_MEDIA_TYPE
260 EXPECT media-col-default OF-TYPE collection IN-GROUP printer-attributes-tag COUNT 1
261 EXPECT media-col-default/media-size OF-TYPE collection COUNT 1
262 EXPECT media-col-default/media-size/x-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
263 EXPECT media-col-default/media-size/y-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
264 EXPECT media-col-default/media-source OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_SOURCE
265 EXPECT media-col-default/media-type OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_TYPE
267 # TODO: Use EXPECT-ALL (STR #4469)
268 EXPECT media-col-ready OF-TYPE collection|no-value IN-GROUP printer-attributes-tag
269 EXPECT media-col-ready/media-size OF-TYPE collection COUNT 1
270 EXPECT media-col-ready/media-size/x-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
271 EXPECT media-col-ready/media-size/y-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
272 EXPECT media-col-ready/media-source OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_SOURCE
273 EXPECT ?media-col-ready/media-source-properties OF-TYPE collection COUNT 1
274 EXPECT media-col-ready/media-type OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_TYPE
276 EXPECT media-col-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
277 EXPECT media-col-supported WITH-VALUE "media-size"
278 EXPECT media-col-supported WITH-VALUE "media-source" IF-DEFINED HAVE_MEDIA_SOURCE
279 EXPECT media-col-supported WITH-VALUE "media-type" IF-DEFINED HAVE_MEDIA_TYPE
281 EXPECT media-default OF-TYPE no-value|keyword|name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$MEDIA_REGEX"
282 EXPECT media-default WITH-VALUE "$MEDIA_REGEX" DEFINE-VALUE DEFAULT_MEDIA
284 EXPECT media-left-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
286 EXPECT media-ready OF-TYPE keyword|name|no-value IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$MEDIA_REGEX"
288 EXPECT media-right-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
290 EXPECT media-size-supported OF-TYPE collection IN-GROUP printer-attributes-tag
291 # TODO: Use EXPECT-ALL (STR #4469)
292 EXPECT media-size-supported/x-dimension OF-TYPE integer|rangeOfInteger
293 EXPECT media-size-supported/y-dimension OF-TYPE integer|rangeOfInteger
295 # media-source-supported tests above to set HAVE_MEDIA_SOURCE
297 EXPECT media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$MEDIA_REGEX"
299 EXPECT media-top-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
301 # media-type-supported tests above to set HAVE_MEDIA_TYPE
303 EXPECT multiple-document-jobs-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
305 EXPECT multiple-operation-time-out OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
307 EXPECT multiple-operation-time-out-action OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(abort-job|hold-job|process-job)$/"
309 EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1
311 # operations-supported tested above for required operations
313 # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
314 EXPECT orientation-requested-default OF-TYPE no-value|enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6,7
315 EXPECT orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6,7
317 # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
318 EXPECT output-bin-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
319 EXPECT output-bin-default DEFINE-VALUE DEFAULT_OUTPUT_BIN
320 EXPECT output-bin-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
322 EXPECT overrides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "document-number" IF-DEFINED HAVE_PDF
323 EXPECT overrides-supported WITH-VALUE "pages" IF-DEFINED HAVE_PDF
325 EXPECT page-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true IF-DEFINED HAVE_PDF
327 EXPECT pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
329 EXPECT pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_COLOR
330 EXPECT !pages-per-minute-color IF-NOT-DEFINED HAVE_COLOR
332 # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
333 EXPECT print-color-mode-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(auto|auto-monochrome|bi-level|color|highlight|monochrome|process-bi-level|process-monochrome)$/"
334 EXPECT print-color-mode-default DEFINE-VALUE DEFAULT_PRINT_COLOR_MODE
335 EXPECT print-color-mode-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|auto-monochrome|bi-level|color|highlight|monochrome|process-bi-level|process-monochrome)$/"
337 # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
338 EXPECT print-content-optimize-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(auto|graphic|photo|text|text-and-graphic)$/"
339 EXPECT print-content-optimize-default DEFINE-VALUE DEFAULT_PRINT_CONTENT_OPTIMIZE
340 EXPECT print-content-optimize-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|graphic|photo|text|text-and-graphic)$/"
342 # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
343 EXPECT print-rendering-intent-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(auto|absolute|perceptual|relative|relative-bpc|saturation)$/"
344 EXPECT print-rendering-intent-default DEFINE-VALUE DEFAULT_PRINT_RENDERING_INTENT
345 EXPECT print-rendering-intent-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|absolute|perceptual|relative|relative-bpc|saturation)$/"
347 # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
348 EXPECT print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
349 EXPECT print-quality-default DEFINE-VALUE DEFAULT_PRINT_QUALITY
350 EXPECT print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5
352 EXPECT ?printer-alert OF-TYPE octetString IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$ALERT_REGEX"
353 EXPECT ?printer-alert-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-alert
355 EXPECT ?printer-charge-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 DEFINE-MATCH HAVE_CHARGE_INFO
356 EXPECT printer-charge-info-uri OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_CHARGE_INFO
358 EXPECT printer-config-change-date-time OF-TYPE dateTime IN-GROUP printer-attributes-tag COUNT 1
360 EXPECT printer-config-change-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >-1
362 EXPECT printer-device-id OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^([-A-Za-z ]+:[^;]*;)+$/"
364 EXPECT printer-geo-location OF-TYPE uri|unknown IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^geo:/"
366 EXPECT printer-get-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "document-format"
368 # TODO: Use EXPECT-ALL syntax
369 EXPECT printer-icc-profiles-supported OF-TYPE collection IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_ICC_PROFILES
370 EXPECT printer-icc-profiles-supported/profile-name OF-TYPE name COUNT 1 IF-DEFINED HAVE_ICC_PROFILES
371 EXPECT printer-icc-profiles-supported/profile-uri OF-TYPE uri COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME" IF-DEFINED HAVE_ICC_PROFILES
373 EXPECT printer-icons OF-TYPE uri IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$HTTP_URI_SCHEME"
374 EXPECT printer-icons OF-TYPE uri WITH-ALL-HOSTNAMES "$hostname"
376 EXPECT printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
378 EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
380 EXPECT printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
382 EXPECT printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
384 EXPECT printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
385 # EXPECT !printer-more-info WITH-HOSTNAME "$LINK_LOCAL"
386 # TODO: Provide warnings when hostname doesn't match
388 EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
390 EXPECT printer-organization OF-TYPE text IN-GROUP printer-attributes-tag
392 EXPECT printer-organizational-unit OF-TYPE text IN-GROUP printer-attributes-tag
394 # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
395 EXPECT printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1
396 EXPECT printer-resolution-default DEFINE-VALUE DEFAULT_PRINTER_RESOLUTION
397 EXPECT printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
399 EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
401 EXPECT printer-state-change-date-time OF-TYPE dateTime IN-GROUP printer-attributes-tag COUNT 1
403 EXPECT printer-state-change-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >-1
405 EXPECT printer-state-message OF-TYPE text IN-GROUP printer-attributes-tag
407 EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag
409 EXPECT printer-supply OF-TYPE octetString IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$SUPPLY_REGEX"
411 EXPECT printer-supply-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-supply
413 EXPECT printer-supply-info-uri OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
414 EXPECT printer-supply-info-uri WITH-HOSTNAME "$hostname"
415 # EXPECT !printer-supply-info-uri WITH-HOSTNAME "$LINK_LOCAL"
417 EXPECT printer-up-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
419 EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported WITH-ALL-VALUES "$IPP_URI_SCHEME"
420 # EXPECT !printer-uri-supported WITH-HOSTNAME "$LINK_LOCAL"
422 EXPECT printer-uuid OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
424 EXPECT pwg-raster-document-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
426 EXPECT pwg-raster-document-sheet-back OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(flipped|manual-tumble|normal|rotated)$$/"
428 EXPECT pwg-raster-document-type-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
430 EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
432 # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
433 EXPECT sides-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-ALL-VALUES "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
434 EXPECT sides-default DEFINE-VALUE DEFAULT_SIDES
435 EXPECT sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
437 EXPECT uri-authentication-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
439 EXPECT uri-security-supported OF-TYPE keyword IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-authentication-supported
441 EXPECT which-jobs-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "completed"
442 EXPECT which-jobs-supported WITH-VALUE "not-completed"
446 # Test Get-Printer-Attributes operation with requested-attributes
448 # Required by: RFC 2911 section 3.2.5, PWG 5100.11 (JPS2)
450 NAME "I-10. Get-Printer-Attributes Operation (requested-attributes)"
451 OPERATION Get-Printer-Attributes
452 GROUP operation-attributes-tag
453 ATTR charset attributes-charset utf-8
454 ATTR naturalLanguage attributes-natural-language en
455 ATTR uri printer-uri $uri
456 ATTR name requesting-user-name $user
457 ATTR keyword requested-attributes media-col-database,printer-uri-supported
461 # TODO: Use EXPECT-ALL (STR #4469)
462 EXPECT media-col-database OF-TYPE collection IN-GROUP printer-attributes-tag
463 EXPECT media-col-database/media-size OF-TYPE collection COUNT 1
464 EXPECT media-col-database/media-size/x-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
465 EXPECT media-col-database/media-size/y-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
466 EXPECT media-col-database/media-source OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_SOURCE
467 EXPECT ?media-col-database/media-source-properties OF-TYPE collection COUNT 1
468 EXPECT media-col-database/media-type OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_TYPE
471 EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$IPP_URI_SCHEME"
475 # Test Validate-Job operation
477 # Required by: RFC 2911 section 3.2.3
479 NAME "I-11 Validate-Job Operation"
480 OPERATION Validate-Job
481 GROUP operation-attributes-tag
482 ATTR charset attributes-charset utf-8
483 ATTR naturalLanguage attributes-natural-language en
484 ATTR uri printer-uri $uri
485 ATTR name requesting-user-name $user
486 ATTR name job-name "color.jpg"
487 ATTR boolean ipp-attribute-fidelity false
488 ATTR name document-name "color.jpg"
489 ATTR keyword compression none
490 ATTR mimeMediaType document-format "image/jpeg"
492 GROUP job-attributes-tag
493 ATTR keyword media "$DEFAULT_MEDIA"
494 ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
495 ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
496 ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
497 ATTR enum print-quality $DEFAULT_PRINT_QUALITY
498 ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
499 ATTR keyword sides "one-sided"
505 # Test Print-Job operation
507 # Required by: RFC 2911 section 3.2.1
509 NAME "I-12. Print-Job Operation (color.jpg)"
511 GROUP operation-attributes-tag
512 ATTR charset attributes-charset utf-8
513 ATTR naturalLanguage attributes-natural-language en
514 ATTR uri printer-uri $uri
515 ATTR name requesting-user-name $user
516 ATTR name job-name "job-color.jpg"
517 ATTR boolean ipp-attribute-fidelity false
518 ATTR name document-name "document-color.jpg"
519 ATTR keyword compression none
520 ATTR mimeMediaType document-format "image/jpeg"
522 GROUP job-attributes-tag
523 ATTR keyword media "$DEFAULT_MEDIA"
524 ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
525 ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
526 ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
527 ATTR enum print-quality $DEFAULT_PRINT_QUALITY
528 ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
529 ATTR keyword sides "one-sided"
534 STATUS server-error-job-canceled
535 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
537 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
539 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0
540 EXPECT job-id DEFINE-VALUE PRINT_JOB_ID
542 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE 3,4,5,6,7,8,9
543 EXPECT job-state WITH-VALUE 7,8,9 DEFINE-MATCH PRINT_JOB_COMPLETED
545 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag
547 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
551 # Test Get-Jobs operation
553 # Required by: RFC 2911 section 3.2.6
555 SKIP-IF-DEFINED PRINT_JOB_COMPLETED
557 NAME "I-13. Get-Jobs Operation (default)"
559 GROUP operation-attributes-tag
560 ATTR charset attributes-charset utf-8
561 ATTR naturalLanguage attributes-natural-language en
562 ATTR uri printer-uri $uri
563 ATTR name requesting-user-name $user
567 EXPECT ?job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
568 EXPECT ?job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
574 # Test Get-Jobs operation
576 # Required by: RFC 2911 section 3.2.6
578 SKIP-IF-DEFINED PRINT_JOB_COMPLETED
580 NAME "I-14. Get-Jobs Operation (requested-attributes)"
582 GROUP operation-attributes-tag
583 ATTR charset attributes-charset utf-8
584 ATTR naturalLanguage attributes-natural-language en
585 ATTR uri printer-uri $uri
586 ATTR name requesting-user-name $user
587 ATTR keyword requested-attributes all
591 # PWG 5100.14 - Table 9 - Job Description attributes
592 EXPECT ?compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
593 EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
594 EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
595 EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
596 EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1
597 EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
598 EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
599 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
600 EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
601 EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
602 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
603 EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$user"
604 EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
605 EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
606 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<7
607 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
608 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
609 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
610 EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
611 EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
612 EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
613 EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
615 # PWG 5100.15 - Table 8 - Job Template attributes
616 EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
617 EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
618 EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
619 EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
620 EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
621 EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
622 EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
623 EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
624 EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
625 EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
626 EXPECT ?page-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag
627 EXPECT ?print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
628 EXPECT ?print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
629 EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
630 EXPECT ?print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
631 EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1
632 EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
636 # Test Get-Jobs operation
638 # Required by: RFC 2911 section 3.2.6
640 SKIP-IF-DEFINED PRINT_JOB_COMPLETED
642 NAME "I-15. Get-Jobs Operation (which-jobs=not-completed)"
644 GROUP operation-attributes-tag
645 ATTR charset attributes-charset utf-8
646 ATTR naturalLanguage attributes-natural-language en
647 ATTR uri printer-uri $uri
648 ATTR name requesting-user-name $user
649 ATTR keyword which-jobs not-completed
653 EXPECT ?job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
654 EXPECT ?job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
660 # Wait for job to complete...
662 SKIP-IF-NOT-DEFINED PRINT_JOB_ID
664 NAME "I-16. Get-Job-Attributes Until Job Complete"
665 OPERATION Get-Job-Attributes
666 GROUP operation-attributes-tag
667 ATTR charset attributes-charset utf-8
668 ATTR naturalLanguage attributes-natural-language en
669 ATTR uri printer-uri $uri
670 ATTR integer job-id $PRINT_JOB_ID
671 ATTR name requesting-user-name $user
674 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6 REPEAT-NO-MATCH REPEAT-LIMIT 30
677 # PWG 5100.14 - Table 9 - Job Description attributes
678 EXPECT compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "none"
679 EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
680 EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
681 EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
682 EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "image/jpeg"
683 EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE ""
684 EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "document-color.jpg"
685 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $PRINT_JOB_ID
686 EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
687 EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
688 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "job-color.jpg"
689 EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
690 EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
691 EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
692 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10
693 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
694 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
695 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
696 EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
697 EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
698 EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
699 EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
701 # PWG 5100.15 - Table 8 - Job Template attributes
702 EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "1"
703 EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
704 EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
705 EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
706 EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
707 EXPECT media OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_MEDIA"
708 EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
709 EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
710 EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
711 EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_OUTPUT_BIN"
713 EXPECT print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_COLOR_MODE"
714 EXPECT print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
715 EXPECT print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $DEFAULT_PRINT_QUALITY
716 EXPECT print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_RENDERING_INTENT"
717 EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINTER_RESOLUTION"
718 EXPECT sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "one-sided"
722 # Test Get-Jobs operation
724 # Required by: RFC 2911 section 3.2.6
726 NAME "I-17. Get-Jobs Operation (which-jobs=completed)"
728 GROUP operation-attributes-tag
729 ATTR charset attributes-charset utf-8
730 ATTR naturalLanguage attributes-natural-language en
731 ATTR uri printer-uri $uri
732 ATTR name requesting-user-name $user
733 ATTR keyword which-jobs completed
737 # TODO: Use EXPECT-ALL/ANY syntax to check for job that was just completed
738 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
739 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
745 # Test Get-Jobs operation
747 # Required by: RFC 2911 section 3.2.6
749 NAME "I-18. Get-Jobs Operation (which-jobs, requested-attributes)"
751 GROUP operation-attributes-tag
752 ATTR charset attributes-charset utf-8
753 ATTR naturalLanguage attributes-natural-language en
754 ATTR uri printer-uri $uri
755 ATTR name requesting-user-name $user
756 ATTR keyword requested-attributes all
757 ATTR keyword which-jobs completed
761 # PWG 5100.14 - Table 9 - Job Description attributes
762 EXPECT compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
763 EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
764 EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
765 EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
766 EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1
767 EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
768 EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
769 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
770 EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
771 EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
772 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
773 EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
774 EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
775 EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
776 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6,<10
777 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
778 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
779 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
780 EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
781 EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
782 EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
783 EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
785 # PWG 5100.15 - Table 8 - Job Template attributes
786 EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
787 EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
788 EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
789 EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
790 EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
791 EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
792 EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
793 EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
794 EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
795 EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
796 EXPECT ?page-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag
797 EXPECT ?print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
798 EXPECT ?print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
799 EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
800 EXPECT ?print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
801 EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1
802 EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
806 # Test Cancel-Job operation
808 # Required by: RFC 2911 section 3.3.3
810 NAME "I-19. Cancel-Job Operation (completed job)"
812 GROUP operation-attributes-tag
813 ATTR charset attributes-charset utf-8
814 ATTR naturalLanguage attributes-natural-language en
815 ATTR uri printer-uri $uri
816 ATTR integer job-id $PRINT_JOB_ID
817 ATTR name requesting-user-name $user
819 STATUS client-error-not-possible
823 # Test Print-Job operation
825 # Required by: RFC 2911 section 3.2.1
827 NAME "I-20. Print-Job Operation (color.jpg)"
829 GROUP operation-attributes-tag
830 ATTR charset attributes-charset utf-8
831 ATTR naturalLanguage attributes-natural-language en
832 ATTR uri printer-uri $uri
833 ATTR name requesting-user-name $user
834 ATTR name job-name "job2-color.jpg"
835 ATTR boolean ipp-attribute-fidelity false
836 ATTR name document-name "document2-color.jpg"
837 ATTR keyword compression none
838 ATTR mimeMediaType document-format "image/jpeg"
840 GROUP job-attributes-tag
841 ATTR keyword media "$DEFAULT_MEDIA"
842 ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
843 ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
844 ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
845 ATTR enum print-quality $DEFAULT_PRINT_QUALITY
846 ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
847 ATTR keyword sides "one-sided"
852 STATUS server-error-job-canceled
853 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
855 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
857 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0
858 EXPECT job-id DEFINE-VALUE PRINT_JOB2_ID
860 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE 3,4,5,6,7,8,9
862 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag
864 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
868 # Test Cancel-Job operation
870 # Required by: RFC 2911 section 3.3.3
872 NAME "I-21. Cancel-Job Operation (pending/processing job)"
874 GROUP operation-attributes-tag
875 ATTR charset attributes-charset utf-8
876 ATTR naturalLanguage attributes-natural-language en
877 ATTR uri printer-uri $uri
878 ATTR integer job-id $PRINT_JOB2_ID
879 ATTR name requesting-user-name $user
882 STATUS client-error-not-possible
886 # Test Get-Job-Attributes operation
888 # Required by: RFC 2911 section 3.3.4
890 NAME "I-22. Get-Job-Attributes Operation"
891 OPERATION Get-Job-Attributes
892 GROUP operation-attributes-tag
893 ATTR charset attributes-charset utf-8
894 ATTR naturalLanguage attributes-natural-language en
895 ATTR uri printer-uri $uri
896 ATTR integer job-id $PRINT_JOB2_ID
897 ATTR name requesting-user-name $user
901 # PWG 5100.14 - Table 9 - Job Description attributes
902 EXPECT compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "none"
903 EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
904 EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
905 EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
906 EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "image/jpeg"
907 EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE ""
908 EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "document2-color.jpg"
909 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $PRINT_JOB2_ID
910 EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
911 EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
912 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "job2-color.jpg"
913 EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
914 EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
915 EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
916 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6,<10
917 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
918 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
919 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
920 EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
921 EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
922 EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
923 EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
925 # PWG 5100.15 - Table 8 - Job Template attributes
926 EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "1"
927 EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
928 EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
929 EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
930 EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
931 EXPECT media OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_MEDIA"
932 EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
933 EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
934 EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
935 EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_OUTPUT_BIN"
937 EXPECT print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_COLOR_MODE"
938 EXPECT print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
939 EXPECT print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $DEFAULT_PRINT_QUALITY
940 EXPECT print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_RENDERING_INTENT"
941 EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINTER_RESOLUTION"
942 EXPECT sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "one-sided"
946 # Test Create-Job and Send-Document operations
948 # Defined by: RFC 2911 section 3.2.4 and 3.3.1
950 NAME "I-23. Create-Job Operation"
952 GROUP operation-attributes-tag
953 ATTR charset attributes-charset utf-8
954 ATTR naturalLanguage attributes-natural-language en
955 ATTR uri printer-uri $uri
956 ATTR name requesting-user-name $user
957 ATTR name job-name "job3-color.jpg"
958 ATTR boolean ipp-attribute-fidelity false
960 GROUP job-attributes-tag
961 ATTR keyword media "$DEFAULT_MEDIA"
962 ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
963 ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
964 ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
965 ATTR enum print-quality $DEFAULT_PRINT_QUALITY
966 ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
967 ATTR keyword sides "one-sided"
970 STATUS server-error-job-canceled
971 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
973 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
975 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0
976 EXPECT job-id DEFINE-VALUE PRINT_JOB3_ID
978 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE 3,4,5,6
980 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag
982 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
986 SKIP-IF-NOT-DEFINED PRINT_JOB3_ID
988 NAME "I-24. Send-Document Operation (color.jpg)"
989 OPERATION Send-Document
990 GROUP operation-attributes-tag
991 ATTR charset attributes-charset utf-8
992 ATTR naturalLanguage attributes-natural-language en
993 ATTR uri printer-uri $uri
994 ATTR integer job-id $PRINT_JOB3_ID
995 ATTR name requesting-user-name $user
996 ATTR boolean last-document true
997 ATTR name document-name "document3-color.jpg"
998 ATTR keyword compression none
999 ATTR mimeMediaType document-format "image/jpeg"
1003 STATUS successful-ok
1004 STATUS server-error-job-canceled
1008 # Wait for job to complete...
1010 SKIP-IF-NOT-DEFINED PRINT_JOB3_ID
1012 NAME "I-25. Get-Job-Attributes Until Job Complete"
1013 OPERATION Get-Job-Attributes
1014 GROUP operation-attributes-tag
1015 ATTR charset attributes-charset utf-8
1016 ATTR naturalLanguage attributes-natural-language en
1017 ATTR uri printer-uri $uri
1018 ATTR integer job-id $PRINT_JOB3_ID
1019 ATTR name requesting-user-name $user
1021 STATUS successful-ok
1022 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6 REPEAT-NO-MATCH REPEAT-LIMIT 30
1025 # PWG 5100.14 - Table 9 - Job Description attributes
1026 EXPECT compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "none"
1027 EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
1028 EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
1029 EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
1030 EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "image/jpeg"
1031 EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE ""
1032 EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "document3-color.jpg"
1033 EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $PRINT_JOB3_ID
1034 EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
1035 EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
1036 EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "job3-color.jpg"
1037 EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
1038 EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
1039 EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
1040 EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10
1041 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
1042 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1043 EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
1044 EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
1045 EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
1046 EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
1047 EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
1049 # PWG 5100.15 - Table 8 - Job Template attributes
1050 EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "1"
1051 EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
1052 EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
1053 EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
1054 EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
1055 EXPECT media OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_MEDIA"
1056 EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
1057 EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
1058 EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
1059 EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_OUTPUT_BIN"
1061 EXPECT print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_COLOR_MODE"
1062 EXPECT print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
1063 EXPECT print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $DEFAULT_PRINT_QUALITY
1064 EXPECT print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_RENDERING_INTENT"
1065 EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINTER_RESOLUTION"
1066 EXPECT sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "one-sided"
1070 # Test 'media-empty' reason
1072 PAUSE "Remove media from printer."
1074 NAME "I-26. Media Empty: Printer correctly reports 'media-empty' when at least one removable tray is empty (MUST NOT be a manual feed or bypass tray)"
1075 OPERATION Get-Printer-Attributes
1076 GROUP operation-attributes-tag
1077 ATTR charset attributes-charset utf-8
1078 ATTR naturalLanguage attributes-natural-language en
1079 ATTR uri printer-uri $uri
1080 ATTR name requesting-user-name $user
1081 ATTR keyword requested-attributes "printer-state-reasons"
1083 STATUS successful-ok
1085 EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^media-empty/"
1086 EXPECT !printer-state
1090 # Test Print-Job operation
1092 # Required by: RFC 2911 section 3.2.1
1094 NAME "I-27. Print-Job Operation (color.jpg)"
1096 GROUP operation-attributes-tag
1097 ATTR charset attributes-charset utf-8
1098 ATTR naturalLanguage attributes-natural-language en
1099 ATTR uri printer-uri $uri
1100 ATTR name requesting-user-name $user
1101 ATTR name job-name "job4-color.jpg"
1102 ATTR boolean ipp-attribute-fidelity false
1103 ATTR name document-name "document4-color.jpg"
1104 ATTR keyword compression none
1105 ATTR mimeMediaType document-format "image/jpeg"
1107 GROUP job-attributes-tag
1108 ATTR keyword media "$DEFAULT_MEDIA"
1109 ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
1110 ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
1111 ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
1112 ATTR enum print-quality $DEFAULT_PRINT_QUALITY
1113 ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
1114 ATTR keyword sides "one-sided"
1118 STATUS successful-ok
1119 STATUS server-error-job-canceled
1120 STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
1122 EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
1124 EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0
1125 EXPECT job-id DEFINE-VALUE PRINT_JOB4_ID
1127 EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE 3,4,5,6,7,8,9
1128 EXPECT job-state WITH-VALUE 7,8,9 DEFINE-MATCH PRINT_JOB_COMPLETED
1130 EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag
1132 EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
1136 # Test 'media-needed' reason
1138 NAME "I-28. Media Needed: Printer correctly reports 'media-needed' when a job is queued."
1139 OPERATION Get-Printer-Attributes
1140 GROUP operation-attributes-tag
1141 ATTR charset attributes-charset utf-8
1142 ATTR naturalLanguage attributes-natural-language en
1143 ATTR uri printer-uri $uri
1144 ATTR name requesting-user-name $user
1145 ATTR keyword requested-attributes "printer-state-reasons"
1147 STATUS successful-ok
1149 EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^media-needed/"
1150 EXPECT !printer-state
1157 # End of "$Id: ipp-tests.test 13138 2016-03-15 14:59:54Z msweet $".