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