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