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