-
Notifications
You must be signed in to change notification settings - Fork 5
/
ipp-tests.test
2455 lines (2057 loc) · 100 KB
/
ipp-tests.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# IPP Everywhere Printer Self-Certification Manual 1.1: Section 6: IPP Tests.
#
# Copyright 2014-2020 by the IEEE-ISTO Printer Working Group.
# Copyright 2007-2019 by Apple Inc.
# Copyright 2001-2006 by Easy Software Products. All rights reserved.
#
# Licensed under Apache License v2.0. See the file "LICENSE" for more
# information.
#
# Usage:
#
# ./ipptool -tI printer-uri ipp-tests.test
#
# History:
#
# This test file is loosely based on the IPP/1.1, IPP/2.0 and IPP Everywhere
# test files from the CUPS "examples" directory. Many of those tests have been
# combined or removed, and all print tests are performed using a sample PWG
# Raster file. These tests also validate support for the 'media-needed' keyword
# in the "printer-state-reasons" Printer attribute.
#
FILE-ID "org.pwg.ippeveselfcert11.ipp"
# All tests use IPP version 2.0, unless overridden in a test...
VERSION 2.0
# Regular expressions for URI schemes:
#
# HTTP_URI_SCHEME - Matches strings beginning with http:// or https://
# IPP_URI_SCHEME - Matches strings beginning with ipp:// or ipps://
# UUID_URI - Matches UUID URN strings.
DEFINE HTTP_URI_SCHEME "/^https?://.+$$/"
DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/"
DEFINE LINK_LOCAL "/^(\[|\[v1.)fe80:/"
DEFINE UUID_URI "/^urn:uuid:[0-9A-Fa-f]{8,8}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{12,12}/"
# Regular expression for PWG media size names (eek!)
#
# Generated with help from: http://abnf.msweet.org/
DEFINE MEDIA_REGEX "/^(choice(_((custom|na|asme|roc|oe|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)){2,}|(custom|na|asme|roc|oe|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)$$/"
# Regular expression for printer-alert attribute
#
# Generated with help from: http://abnf.msweet.org/
DEFINE ALERT_REGEX "/^code\=[A-Za-z]+(;index\=[0-9]+|;severity\=[A-Za-z]+|;training\=[A-Za-z]+|;group\=[A-Za-z]+|;groupindex\=[0-9]+|;location\=[0-9]+|;time\=[0-9]+){0,};?$$/"
# Regular expression for printer-supply attribute
#
# Generated with help from: http://abnf.msweet.org/
DEFINE SUPPLY_REGEX "/^(type\=[A-Za-z]+;|maxcapacity\=-{0,1}[0-9]+;|level\=-{0,1}[0-9]+;|index\=[0-9]+;|markerindex\=[0-9]+;|class\=[A-Za-z]+;|unit\=[A-Za-z]+;|colorantindex\=[0-9]+;|colorantrole\=[A-Za-z]+;|colorantname\=[-_.A-Za-z0-9]+;|coloranttonality\=[0-9]+;){0,}$$/"
# Test that a request-id value of 0 is not accepted.
#
# Required by: RFC 8011 section 4.1.1
{
NAME "I-1. RFC 8011 section 4.1.1: Bad request-id value 0"
REQUEST-ID 0
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri printer-uri $uri
STATUS client-error-bad-request
EXPECT !printer-uri-supported
}
# Test that the first two attributes must be attributes-charset and
# attributes-natural-language.
#
# Required by: RFC 8011 section 4.1.4
{
NAME "I-2. RFC 8011 section 4.1.4: No Operation Attributes"
REQUEST-ID random
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
STATUS client-error-bad-request
EXPECT !printer-uri-supported
}
{
NAME "I-3. RFC 8011 section 4.1.4: attributes-charset"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR uri printer-uri $uri
STATUS client-error-bad-request
EXPECT !printer-uri-supported
}
{
NAME "I-4. RFC 8011 section 4.1.4: attributes-natural-language"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR naturalLanguage attributes-natural-language en
ATTR uri printer-uri $uri
STATUS client-error-bad-request
EXPECT !printer-uri-supported
}
{
NAME "I-5. RFC 8011 section 4.1.4: attributes-natural-language + attributes-charset"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR naturalLanguage attributes-natural-language en
ATTR charset attributes-charset utf-8
ATTR uri printer-uri $uri
STATUS client-error-bad-request
EXPECT !printer-uri-supported
}
{
NAME "I-6. RFC 8011 section 4.1.4: attributes-charset + attributes-natural-language"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri printer-uri $uri
STATUS successful-ok
EXPECT printer-uri-supported OF-TYPE uri WITH-ALL-VALUES "$IPP_URI_SCHEME"
}
# Test that bad IPP versions are not supported.
#
# Required by: RFC 8011 section 4.1.8
{
# The name of the test...
NAME "I-7. RFC 8011 section 4.1.8: Unsupported IPP version 0.0"
VERSION 0.0
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri printer-uri $uri
STATUS server-error-version-not-supported
EXPECT !printer-uri-supported
}
# Test that printer operations require the printer-uri operation attribute.
#
# Required by: RFC 8011 section 4.2
{
NAME "I-8. RFC 8011 section 4.2: No printer-uri operation attribute"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
STATUS client-error-bad-request
EXPECT !printer-uri-supported
}
# Test Identify-Printer operation
#
# Required by: PWG 5100.14 Section 5.x
{
SKIP-IF-NOT-DEFINED HAVE_IDENTIFY_PRINTER
NAME "I-9. Identify-Printer Operation"
OPERATION Identify-Printer
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri printer-uri $uri
ATTR name requesting-user-name $user
STATUS successful-ok
}
# Test Get-Printer-Attributes operation
#
# Required by: PWG 5100.14 Section 5.x
{
NAME "I-10. Get-Printer-Attributes Operation (default)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR naturalLanguage attributes-natural-language en
ATTR uri printer-uri $uri
ATTR name requesting-user-name $user
STATUS successful-ok
# ipp-features-supported
EXPECT ipp-features-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "ipp-everywhere"
EXPECT ipp-features-supported WITH-VALUE "ipp-everywhere-server" DEFINE-MATCH IPP_EVERYWHERE_SERVER
##### PWG 5100.14 - Table 5 - Operations
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0002 # Print-Job
EXPECT operations-supported WITH-VALUE 0x0004 # Validate-Job
EXPECT operations-supported WITH-VALUE 0x0005 # Create-Job
EXPECT operations-supported WITH-VALUE 0x0006 # Send-Document
EXPECT operations-supported WITH-VALUE 0x0008 # Cancel-Job
EXPECT operations-supported WITH-VALUE 0x0009 # Get-Job-Attributes
EXPECT operations-supported WITH-VALUE 0x000a # Get-Jobs
EXPECT operations-supported WITH-VALUE 0x000b # Get-Printer-Attributes
EXPECT operations-supported WITH-VALUE 0x0039 # Cancel-My-Jobs
EXPECT operations-supported WITH-VALUE 0x003b # Close-Job
EXPECT operations-supported WITH-VALUE 0x003c # Identify-Printer
IF-NOT-DEFINED IPP_EVERYWHERE_SERVER DEFINE-MATCH HAVE_IDENTIFY_PRINTER
# Default Get-Printer-Attributes MUST NOT return media-col-database, per PWG 5100.7 (JOBEXT)
EXPECT !media-col-database OF-TYPE collection IN-GROUP printer-attributes-tag
#### PWG 5100.14 - Table 6 - Printer Description Attributes that are part of the 'printer-description' group
EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag COUNT 1
EXPECT charset-supported OF-TYPE charset IN-GROUP printer-attributes-tag WITH-VALUE utf-8
EXPECT color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
EXPECT color-supported WITH-VALUE true DEFINE-MATCH HAVE_COLOR
EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "none"
EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "deflate" DEFINE-MATCH HAVE_DEFLATE
EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "gzip" DEFINE-MATCH HAVE_GZIP
EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag COUNT 1
EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/pwg-raster"
EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/jpeg" IF-DEFINED HAVE_COLOR
EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/jpeg" DEFINE-MATCH HAVE_JPEG
EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "application/pdf" DEFINE-MATCH HAVE_PDF
EXPECT document-password-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_PDF
EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag
EXPECT identify-actions-default OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(display|flash|sound|speak)$/" IF-DEFINED HAVE_IDENTIFY_PRINTER
EXPECT identify-actions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(display|flash|sound|speak)$/" IF-DEFINED HAVE_IDENTIFY_PRINTER
EXPECT ipp-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "2.0"
EXPECT job-constraints-supported OF-TYPE collection IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_JOB_CONSTRAINTS
EXPECT job-creation-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(media|print-color-mode)$$/"
EXPECT job-ids-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true
# TODO: Make job-password-xxx conditionally required if the printer supports "Print to a Recipient" (???)
EXPECT job-password-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 DEFINE-MATCH PRINT_TO_A_RECIPIENT
EXPECT job-password-encryption-supported OF-TYPE keyword IN-GROUP printer-attributes-tag IF-DEFINED PRINT_TO_A_RECIPIENT
EXPECT job-resolvers-supported OF-TYPE collection IN-GROUP printer-attributes-tag IF-DEFINED HAVE_JOB_CONSTRAINTS
EXPECT multiple-document-jobs-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
EXPECT multiple-operation-time-out OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT multiple-operation-time-out-action OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(abort-job|hold-job|process-job)$/"
EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag
EXPECT pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
EXPECT pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_COLOR
EXPECT !pages-per-minute-color IF-NOT-DEFINED HAVE_COLOR
EXPECT pdl-override-supported OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1
EXPECT preferred-attributes-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?printer-alert OF-TYPE octetString IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$ALERT_REGEX"
EXPECT ?printer-alert-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-alert
EXPECT ?printer-charge-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 DEFINE-MATCH HAVE_CHARGE_INFO
EXPECT printer-charge-info-uri OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_CHARGE_INFO
EXPECT printer-config-change-date-time OF-TYPE dateTime|unknown|no-value IN-GROUP printer-attributes-tag COUNT 1
EXPECT printer-config-change-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >-1
EXPECT printer-current-time OF-TYPE dateTime|unknown|no-value IN-GROUP printer-attributes-tag COUNT 1
EXPECT printer-geo-location OF-TYPE uri|unknown IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^geo:/"
EXPECT printer-get-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "document-format"
EXPECT printer-icc-profiles-supported OF-TYPE collection IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_ICC_PROFILES
EXPECT-ALL printer-icc-profiles-supported/profile-name OF-TYPE name COUNT 1 IF-DEFINED HAVE_ICC_PROFILES
EXPECT-ALL printer-icc-profiles-supported/profile-uri OF-TYPE uri COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME" IF-DEFINED HAVE_ICC_PROFILES
EXPECT printer-icons OF-TYPE uri IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$HTTP_URI_SCHEME"
EXPECT printer-icons OF-TYPE uri WITH-ALL-HOSTNAMES "$hostname"
EXPECT printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
EXPECT printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
EXPECT printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
EXPECT printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
EXPECT printer-more-info WITH-HOSTNAME "$hostname"
# EXPECT !printer-more-info WITH-HOSTNAME "$LINK_LOCAL"
# TODO: Provide warnings when hostname doesn't match
EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
EXPECT printer-organization OF-TYPE text IN-GROUP printer-attributes-tag
EXPECT printer-organizational-unit OF-TYPE text IN-GROUP printer-attributes-tag
EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
EXPECT printer-state-change-date-time OF-TYPE dateTime|unknown|no-value IN-GROUP printer-attributes-tag COUNT 1
EXPECT printer-state-change-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >-1
EXPECT printer-state-message OF-TYPE text IN-GROUP printer-attributes-tag
EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT printer-supply DEFINE-MATCH HAVE_PRINTER_SUPPLY
EXPECT printer-supply-description DEFINE-MATCH HAVE_PRINTER_SUPPLY
EXPECT printer-supply-info-uri DEFINE-MATCH HAVE_PRINTER_SUPPLY
EXPECT printer-supply OF-TYPE octetString IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$SUPPLY_REGEX" IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-supply-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-supply IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-supply-info-uri OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME" IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-supply-info-uri WITH-HOSTNAME "$hostname" IF-DEFINED HAVE_PRINTER_SUPPLY
# EXPECT !printer-supply-info-uri WITH-HOSTNAME "$LINK_LOCAL"
EXPECT printer-up-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported WITH-ALL-VALUES "$IPP_URI_SCHEME"
# EXPECT !printer-uri-supported WITH-HOSTNAME "$LINK_LOCAL"
EXPECT printer-uuid OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
EXPECT pwg-raster-document-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
EXPECT pwg-raster-document-resolution-supported DEFINE-VALUE RASTER_RESOLUTION
EXPECT sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^two-sided-(long|short)-edge$$/" DEFINE-MATCH HAVE_DUPLEX
EXPECT pwg-raster-document-sheet-back OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(flipped|manual-tumble|normal|rotated)$$/" IF-DEFINED HAVE_DUPLEX
EXPECT pwg-raster-document-type-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT pwg-raster-document-type-supported WITH-VALUE "black_1" DEFINE-MATCH HAVE_BLACK
EXPECT pwg-raster-document-type-supported WITH-VALUE "sgray_8" DEFINE-MATCH HAVE_SGRAY
EXPECT pwg-raster-document-type-supported WITH-VALUE "srgb_8" DEFINE-MATCH HAVE_SRGB
EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
EXPECT uri-authentication-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT uri-security-supported OF-TYPE keyword IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-authentication-supported
EXPECT which-jobs-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "completed"
EXPECT which-jobs-supported WITH-VALUE "not-completed"
#### PWG 5100.14 - Table 6 - Printer Description Attributes that are part of the 'job-template' group
EXPECT copies-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT copies-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag
EXPECT finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_FINISHINGS
EXPECT finishing-template-supported OF-TYPE keyword IN-GROUP printer-attributes-tag IF-DEFINED HAVE_FINISHINGS
EXPECT finishing-template-supported WITH-VALUE "none" IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-col-database OF-TYPE collection IN-GROUP printer-attributes-tag IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-col-database/finishing-template OF-TYPE keyword|name IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-col-default OF-TYPE collection IN-GROUP printer-attributes-tag IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-col-default/finishing-template OF-TYPE keyword|name IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-col-ready OF-TYPE collection IN-GROUP printer-attributes-tag IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-col-ready/finishing-template OF-TYPE keyword|name IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-col-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "finishing-template" IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE-FROM "finishings-supported" IF-DEFINED HAVE_FINISHINGS
EXPECT ?finishings-ready OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE-FROM "finishings-supported"
EXPECT finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-supported WITH-VALUE 3 IF-DEFINED HAVE_FINISHINGS
EXPECT job-account-id-supported OF-TYPE boolean IN-GROUP printer-attributes-tag WITH-VALUE true COUNT 1 DEFINE-MATCH HAVE_JOB_ACCOUNT_ID
EXPECT job-account-id-default OF-TYPE name|no-value IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_JOB_ACCOUNT_ID
EXPECT job-accounting-user-id-supported OF-TYPE boolean IN-GROUP printer-attributes-tag WITH-VALUE true COUNT 1 DEFINE-MATCH HAVE_JOB_ACCOUNTING_USER_ID
EXPECT job-accounting-user-id-default OF-TYPE name|no-value IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_JOB_ACCOUNTING_USER_ID
EXPECT media-bottom-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
EXPECT media-col-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT media-col-supported WITH-VALUE "media-size"
EXPECT media-default OF-TYPE no-value|keyword|name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$MEDIA_REGEX"
EXPECT media-default WITH-VALUE "$MEDIA_REGEX" DEFINE-VALUE DEFAULT_MEDIA
EXPECT media-left-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
EXPECT media-ready OF-TYPE keyword|name|no-value IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$MEDIA_REGEX"
EXPECT media-right-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
EXPECT media-size-supported OF-TYPE collection IN-GROUP printer-attributes-tag
EXPECT-ALL media-size-supported/x-dimension OF-TYPE integer|rangeOfInteger
EXPECT-ALL media-size-supported/y-dimension OF-TYPE integer|rangeOfInteger
EXPECT media-source-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_MEDIA_SOURCE
EXPECT media-col-supported WITH-VALUE "media-source" IF-DEFINED HAVE_MEDIA_SOURCE
EXPECT media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$MEDIA_REGEX"
EXPECT media-top-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
EXPECT media-type-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_MEDIA_TYPE
EXPECT media-col-supported WITH-VALUE "media-type" IF-DEFINED HAVE_MEDIA_TYPE
EXPECT media-col-default OF-TYPE collection IN-GROUP printer-attributes-tag COUNT 1
EXPECT media-col-default/media-size OF-TYPE collection COUNT 1
EXPECT media-col-default/media-size/x-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
EXPECT media-col-default/media-size/y-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
EXPECT media-col-default/media-source OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_SOURCE
EXPECT media-col-default/media-type OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_TYPE
EXPECT media-col-ready OF-TYPE collection|no-value IN-GROUP printer-attributes-tag
EXPECT-ALL media-col-ready/media-size OF-TYPE collection COUNT 1
EXPECT-ALL media-col-ready/media-size/x-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
EXPECT-ALL media-col-ready/media-size/y-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
EXPECT-ALL media-col-ready/media-source OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_SOURCE
EXPECT-ALL ?media-col-ready/media-source-properties OF-TYPE collection COUNT 1
EXPECT-ALL media-col-ready/media-type OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_TYPE
EXPECT orientation-requested-default OF-TYPE no-value|enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "orientation-requested-supported"
EXPECT orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6,7
EXPECT output-bin-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "output-bin-supported"
EXPECT output-bin-default DEFINE-VALUE DEFAULT_OUTPUT_BIN
EXPECT output-bin-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
EXPECT overrides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "pages" IF-DEFINED HAVE_PDF
EXPECT page-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true IF-DEFINED HAVE_PDF
EXPECT print-color-mode-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "print-color-mode-supported"
EXPECT print-color-mode-default DEFINE-VALUE DEFAULT_PRINT_COLOR_MODE
EXPECT print-color-mode-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|auto-monochrome|bi-level|color|highlight|monochrome|process-bi-level|process-monochrome)$/"
EXPECT ?print-content-optimize-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|graphic|photo|text|text-and-graphic)$/"
EXPECT print-content-optimize-supported DEFINE-MATCH HAVE_PRINT_CONTENT_OPTIMIZE
EXPECT print-content-optimize-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "print-content-optimize-supported" IF-DEFINED HAVE_PRINT_CONTENT_OPTIMIZE
EXPECT print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "print-quality-supported"
EXPECT print-quality-default DEFINE-VALUE DEFAULT_PRINT_QUALITY
EXPECT print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5
EXPECT print-rendering-intent-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "print-rendering-intent-supported" IF-DEFINED HAVE_ICC_PROFILES
EXPECT print-rendering-intent-default DEFINE-VALUE DEFAULT_PRINT_RENDERING_INTENT
EXPECT print-rendering-intent-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|absolute|perceptual|relative|relative-bpc|saturation)$/" IF-DEFINED HAVE_ICC_PROFILES
EXPECT printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "printer-resolution-supported"
EXPECT printer-resolution-default DEFINE-VALUE DEFAULT_PRINTER_RESOLUTION
EXPECT printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
EXPECT sides-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "sides-supported"
EXPECT sides-default DEFINE-VALUE DEFAULT_SIDES
EXPECT sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
# Recommended attributes
EXPECT ?job-account-type-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "job-account-type-supported"
EXPECT ?job-account-type-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?job-authorization-uri-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?job-mandatory-attributes-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?job-password-repertoire-configured OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "job-password-repertoire-supported"
EXPECT ?job-password-repertoire-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?job-presets-supported OF-TYPE collection IN-GROUP printer-attributes-tag
EXPECT ?job-privacy-attributes OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?job-privacy-scope OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(all|default|owner|none)$$/"
EXPECT ?printer-privacy-policy-uri OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?jpeg-features-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?jpeg-k-octets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?jpeg-x-dimension-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?jpeg-y-dimension-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?pdf-k-octets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?pdf-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?print-scaling-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM "print-scaling-supported"
EXPECT ?print-scaling-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?printer-dns-sd-name OF-TYPE name IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?printer-input-tray OF-TYPE octetString IN-GROUP printer-attributes-tag SAME-COUNT-AS "media-source-supported"
EXPECT ?printer-output-tray OF-TYPE octetString IN-GROUP printer-attributes-tag SAME-COUNT-AS "output-bin-supported"
}
#
# Test different values of requested-attributes
#
{
NAME "I-10.1 Get-Printer-Attributes Operation (all)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR keyword requested-attributes 'all'
STATUS successful-ok
# 'media-col-database' attribute should never be returned unless
# explicitly requested...
EXPECT !media-col-database
# 'printer-description' attributes
EXPECT charset-configured
EXPECT charset-supported
EXPECT color-supported
EXPECT compression-supported
EXPECT document-format-default
EXPECT document-format-supported
EXPECT generated-natural-language-supported
EXPECT identify-actions-default
EXPECT identify-actions-supported
EXPECT ipp-features-supported
EXPECT ipp-versions-supported
EXPECT job-constraints-supported IF-DEFINED HAVE_JOB_CONSTRAINTS
EXPECT job-creation-attributes-supported
EXPECT job-ids-supported
EXPECT job-password-supported IF-DEFINED HAVE_PRINT_TO_A_RECIPIENT
EXPECT job-password-encryption-supported IF-DEFINED HAVE_PRINT_TO_A_RECIPIENT
EXPECT job-resolvers-supported IF-DEFINED HAVE_JOB_CONSTRAINTS
EXPECT multiple-document-jobs-supported
EXPECT multiple-operation-time-out
EXPECT multiple-operation-time-out-action
EXPECT natural-language-configured
EXPECT operations-supported
EXPECT pages-per-minute
EXPECT pages-per-minute-color IF-DEFINED HAVE_COLOR
EXPECT !pages-per-minute-color IF-NOT-DEFINED HAVE_COLOR
EXPECT pdl-override-supported
EXPECT preferred-attributes-supported
EXPECT printer-charge-info-uri IF-DEFINED HAVE_CHARGE_INFO
EXPECT printer-config-change-date-time
EXPECT printer-config-change-time
EXPECT printer-current-time
EXPECT printer-geo-location
EXPECT printer-get-attributes-supported
EXPECT printer-icc-profiles-supported IF-DEFINED HAVE_ICC_PROFILES
EXPECT printer-icons
EXPECT printer-info
EXPECT printer-is-accepting-jobs
EXPECT printer-location
EXPECT printer-make-and-model
EXPECT printer-more-info
EXPECT printer-name
EXPECT printer-organization
EXPECT printer-organizational-unit
EXPECT printer-state
EXPECT printer-state-change-date-time
EXPECT printer-state-change-time
EXPECT printer-state-message
EXPECT printer-state-reasons
EXPECT printer-supply IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-supply-description IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-supply-info-uri IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-up-time
EXPECT printer-uri-supported
EXPECT printer-uuid
EXPECT pwg-raster-document-resolution-supported
EXPECT pwg-raster-document-sheet-back IF-DEFINED HAVE_DUPLEX
EXPECT pwg-raster-document-type-supported
EXPECT queued-job-count
EXPECT uri-authentication-supported
EXPECT uri-security-supported
EXPECT which-jobs-supported
# 'job-template' attributes
EXPECT copies-default
EXPECT copies-supported
EXPECT finishings-default IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-supported IF-DEFINED HAVE_FINISHINGS
EXPECT media-bottom-margin-supported
EXPECT media-col-default
EXPECT media-col-ready
EXPECT media-col-supported
EXPECT media-default
EXPECT media-left-margin-supported
EXPECT media-ready
EXPECT media-right-margin-supported
EXPECT media-size-supported
EXPECT media-source-supported IF-DEFINED HAVE_MEDIA_SOURCE
EXPECT media-supported
EXPECT media-top-margin-supported
EXPECT media-type-supported IF-DEFINED HAVE_MEDIA_TYPE
EXPECT orientation-requested-default
EXPECT orientation-requested-supported
EXPECT output-bin-default
EXPECT output-bin-supported
EXPECT overrides-supported IF-DEFINED HAVE_PDF
EXPECT page-ranges-supported IF-DEFINED HAVE_PDF
EXPECT print-color-mode-default
EXPECT print-color-mode-supported
EXPECT print-content-optimize-default IF-DEFINED HAVE_PRINT_CONTENT_OPTIMIZE
EXPECT print-content-optimize-supported IF-DEFINED HAVE_PRINT_CONTENT_OPTIMIZE
EXPECT print-quality-default
EXPECT print-quality-supported
EXPECT print-rendering-intent-default IF-DEFINED HAVE_ICC_PROFILES
EXPECT print-rendering-intent-supported IF-DEFINED HAVE_ICC_PROFILES
EXPECT printer-resolution-default
EXPECT printer-resolution-supported
EXPECT sides-default IF-DEFINED HAVE_DUPLEX
EXPECT sides-supported IF-DEFINED HAVE_DUPLEX
}
{
NAME "I-10.2. Get-Printer-Attributes Operation (all, media-col-database)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR keyword requested-attributes all,media-col-database
STATUS successful-ok
# 'media-col-database' attribute should never be returned unless
# explicitly requested...
EXPECT media-col-database OF-TYPE collection IN-GROUP printer-attributes-tag
# 'printer-description' attributes
EXPECT charset-configured
EXPECT charset-supported
EXPECT color-supported
EXPECT compression-supported
EXPECT document-format-default
EXPECT document-format-supported
EXPECT generated-natural-language-supported
EXPECT identify-actions-default
EXPECT identify-actions-supported
EXPECT ipp-features-supported
EXPECT ipp-versions-supported
EXPECT job-constraints-supported IF-DEFINED HAVE_JOB_CONSTRAINTS
EXPECT job-creation-attributes-supported
EXPECT job-ids-supported
EXPECT job-password-supported IF-DEFINED HAVE_PRINT_TO_A_RECIPIENT
EXPECT job-password-encryption-supported IF-DEFINED HAVE_PRINT_TO_A_RECIPIENT
EXPECT job-resolvers-supported IF-DEFINED HAVE_JOB_CONSTRAINTS
EXPECT multiple-document-jobs-supported
EXPECT multiple-operation-time-out
EXPECT multiple-operation-time-out-action
EXPECT natural-language-configured
EXPECT operations-supported
EXPECT pages-per-minute
EXPECT pages-per-minute-color IF-DEFINED HAVE_COLOR
EXPECT !pages-per-minute-color IF-NOT-DEFINED HAVE_COLOR
EXPECT pdl-override-supported
EXPECT preferred-attributes-supported
EXPECT printer-charge-info-uri IF-DEFINED HAVE_CHARGE_INFO
EXPECT printer-config-change-date-time
EXPECT printer-config-change-time
EXPECT printer-current-time
EXPECT printer-geo-location
EXPECT printer-get-attributes-supported
EXPECT printer-icc-profiles-supported IF-DEFINED HAVE_ICC_PROFILES
EXPECT printer-icons
EXPECT printer-info
EXPECT printer-is-accepting-jobs
EXPECT printer-location
EXPECT printer-make-and-model
EXPECT printer-more-info
EXPECT printer-name
EXPECT printer-organization
EXPECT printer-organizational-unit
EXPECT printer-state
EXPECT printer-state-change-date-time
EXPECT printer-state-change-time
EXPECT printer-state-message
EXPECT printer-state-reasons
EXPECT printer-supply IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-supply-description IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-supply-info-uri IF-DEFINED HAVE_PRINTER_SUPPLY
EXPECT printer-up-time
EXPECT printer-uri-supported
EXPECT printer-uuid
EXPECT pwg-raster-document-resolution-supported
EXPECT pwg-raster-document-sheet-back IF-DEFINED HAVE_DUPLEX
EXPECT pwg-raster-document-type-supported
EXPECT queued-job-count
EXPECT uri-authentication-supported
EXPECT uri-security-supported
EXPECT which-jobs-supported
# 'job-template' attributes
EXPECT copies-default
EXPECT copies-supported
EXPECT finishings-default IF-DEFINED HAVE_FINISHINGS
EXPECT finishings-supported IF-DEFINED HAVE_FINISHINGS
EXPECT media-bottom-margin-supported
EXPECT media-col-default
EXPECT media-col-ready
EXPECT media-col-supported
EXPECT media-default
EXPECT media-left-margin-supported
EXPECT media-ready
EXPECT media-right-margin-supported
EXPECT media-size-supported
EXPECT media-source-supported IF-DEFINED HAVE_MEDIA_SOURCE
EXPECT media-supported
EXPECT media-top-margin-supported
EXPECT media-type-supported IF-DEFINED HAVE_MEDIA_TYPE
EXPECT orientation-requested-default
EXPECT orientation-requested-supported
EXPECT output-bin-default
EXPECT output-bin-supported
EXPECT overrides-supported IF-DEFINED HAVE_PDF
EXPECT page-ranges-supported IF-DEFINED HAVE_PDF
EXPECT print-color-mode-default
EXPECT print-color-mode-supported
EXPECT print-content-optimize-default IF-DEFINED HAVE_PRINT_CONTENT_OPTIMIZE
EXPECT print-content-optimize-supported IF-DEFINED HAVE_PRINT_CONTENT_OPTIMIZE
EXPECT print-quality-default
EXPECT print-quality-supported
EXPECT print-rendering-intent-default IF-DEFINED HAVE_ICC_PROFILES
EXPECT print-rendering-intent-supported IF-DEFINED HAVE_ICC_PROFILES
EXPECT printer-resolution-default
EXPECT printer-resolution-supported
EXPECT sides-default IF-DEFINED HAVE_DUPLEX
EXPECT sides-supported IF-DEFINED HAVE_DUPLEX
}
{
NAME "I-10.3. Get-Printer-Attributes Operation (none)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR keyword requested-attributes 'none'
STATUS successful-ok
# 'media-col-database' attribute should never be returned unless
# explicitly requested...
EXPECT !media-col-database
# 'printer-description' attributes
EXPECT !charset-configured
EXPECT !charset-supported
EXPECT !color-supported
EXPECT !compression-supported
EXPECT !document-format-default
EXPECT !document-format-supported
EXPECT !generated-natural-language-supported
EXPECT !identify-actions-default
EXPECT !identify-actions-supported
EXPECT !ipp-features-supported
EXPECT !ipp-versions-supported
EXPECT !job-constraints-supported
EXPECT !job-creation-attributes-supported
EXPECT !job-ids-supported
EXPECT !job-password-supported
EXPECT !job-password-encryption-supported
EXPECT !job-resolvers-supported
EXPECT !multiple-document-jobs-supported
EXPECT !multiple-operation-time-out
EXPECT !multiple-operation-time-out-action
EXPECT !natural-language-configured
EXPECT !operations-supported
EXPECT !pages-per-minute
EXPECT !pages-per-minute-color
EXPECT !!pages-per-minute-color
EXPECT !pdl-override-supported
EXPECT !preferred-attributes-supported
EXPECT !printer-charge-info-uri
EXPECT !printer-config-change-date-time
EXPECT !printer-config-change-time
EXPECT !printer-current-time
EXPECT !printer-geo-location
EXPECT !printer-get-attributes-supported
EXPECT !printer-icc-profiles-supported
EXPECT !printer-icons
EXPECT !printer-info
EXPECT !printer-is-accepting-jobs
EXPECT !printer-location
EXPECT !printer-make-and-model
EXPECT !printer-more-info
EXPECT !printer-name
EXPECT !printer-organization
EXPECT !printer-organizational-unit
EXPECT !printer-state
EXPECT !printer-state-change-date-time
EXPECT !printer-state-change-time
EXPECT !printer-state-message
EXPECT !printer-state-reasons
EXPECT !printer-supply
EXPECT !printer-supply-description
EXPECT !printer-supply-info-uri
EXPECT !printer-up-time
EXPECT !printer-uri-supported
EXPECT !printer-uuid
EXPECT !pwg-raster-document-resolution-supported
EXPECT !pwg-raster-document-sheet-back
EXPECT !pwg-raster-document-type-supported
EXPECT !queued-job-count
EXPECT !uri-authentication-supported
EXPECT !uri-security-supported
EXPECT !which-jobs-supported
# 'job-template' attributes
EXPECT !copies-default
EXPECT !copies-supported
EXPECT !finishings-default
EXPECT !finishings-supported
EXPECT !media-bottom-margin-supported
EXPECT !media-col-default
EXPECT !media-col-ready
EXPECT !media-col-supported
EXPECT !media-default
EXPECT !media-left-margin-supported
EXPECT !media-ready
EXPECT !media-right-margin-supported
EXPECT !media-size-supported
EXPECT !media-source-supported
EXPECT !media-supported
EXPECT !media-top-margin-supported
EXPECT !media-type-supported
EXPECT !orientation-requested-default
EXPECT !orientation-requested-supported
EXPECT !output-bin-default
EXPECT !output-bin-supported
EXPECT !overrides-supported
EXPECT !page-ranges-supported
EXPECT !print-color-mode-default
EXPECT !print-color-mode-supported
EXPECT !print-content-optimize-default
EXPECT !print-content-optimize-supported
EXPECT !print-quality-default
EXPECT !print-quality-supported
EXPECT !print-rendering-intent-default
EXPECT !print-rendering-intent-supported
EXPECT !printer-resolution-default
EXPECT !printer-resolution-supported
EXPECT !sides-default IF-DEFINED HAVE_DUPLEX
EXPECT !sides-supported IF-DEFINED HAVE_DUPLEX
}
{
NAME "I-10.4. Get-Printer-Attributes Operation (media-col-database)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR keyword requested-attributes 'media-col-database'
STATUS successful-ok
# 'media-col-database' attribute should never be returned unless
# explicitly requested...
EXPECT media-col-database OF-TYPE collection IN-GROUP printer-attributes-tag
# 'printer-description' attributes
EXPECT !charset-configured
EXPECT !charset-supported
EXPECT !color-supported
EXPECT !compression-supported
EXPECT !document-format-default
EXPECT !document-format-supported
EXPECT !generated-natural-language-supported
EXPECT !identify-actions-default
EXPECT !identify-actions-supported
EXPECT !ipp-features-supported
EXPECT !ipp-versions-supported
EXPECT !job-constraints-supported
EXPECT !job-creation-attributes-supported
EXPECT !job-ids-supported
EXPECT !job-password-supported
EXPECT !job-password-encryption-supported
EXPECT !job-resolvers-supported
EXPECT !multiple-document-jobs-supported
EXPECT !multiple-operation-time-out
EXPECT !multiple-operation-time-out-action
EXPECT !natural-language-configured
EXPECT !operations-supported
EXPECT !pages-per-minute
EXPECT !pages-per-minute-color
EXPECT !!pages-per-minute-color
EXPECT !pdl-override-supported
EXPECT !preferred-attributes-supported
EXPECT !printer-charge-info-uri
EXPECT !printer-config-change-date-time
EXPECT !printer-config-change-time
EXPECT !printer-current-time
EXPECT !printer-geo-location
EXPECT !printer-get-attributes-supported
EXPECT !printer-icc-profiles-supported
EXPECT !printer-icons
EXPECT !printer-info
EXPECT !printer-is-accepting-jobs
EXPECT !printer-location
EXPECT !printer-make-and-model
EXPECT !printer-more-info
EXPECT !printer-name
EXPECT !printer-organization
EXPECT !printer-organizational-unit
EXPECT !printer-state
EXPECT !printer-state-change-date-time
EXPECT !printer-state-change-time
EXPECT !printer-state-message
EXPECT !printer-state-reasons
EXPECT !printer-supply
EXPECT !printer-supply-description
EXPECT !printer-supply-info-uri
EXPECT !printer-up-time
EXPECT !printer-uri-supported
EXPECT !printer-uuid
EXPECT !pwg-raster-document-resolution-supported
EXPECT !pwg-raster-document-sheet-back
EXPECT !pwg-raster-document-type-supported
EXPECT !queued-job-count
EXPECT !uri-authentication-supported
EXPECT !uri-security-supported
EXPECT !which-jobs-supported
# 'job-template' attributes
EXPECT !copies-default
EXPECT !copies-supported
EXPECT !finishings-default
EXPECT !finishings-supported
EXPECT !media-bottom-margin-supported
EXPECT !media-col-default
EXPECT !media-col-ready
EXPECT !media-col-supported
EXPECT !media-default
EXPECT !media-left-margin-supported
EXPECT !media-ready
EXPECT !media-right-margin-supported
EXPECT !media-size-supported
EXPECT !media-source-supported
EXPECT !media-supported
EXPECT !media-top-margin-supported
EXPECT !media-type-supported
EXPECT !orientation-requested-default
EXPECT !orientation-requested-supported
EXPECT !output-bin-default
EXPECT !output-bin-supported
EXPECT !overrides-supported
EXPECT !page-ranges-supported
EXPECT !print-color-mode-default
EXPECT !print-color-mode-supported
EXPECT !print-content-optimize-default
EXPECT !print-content-optimize-supported
EXPECT !print-quality-default
EXPECT !print-quality-supported
EXPECT !print-rendering-intent-default
EXPECT !print-rendering-intent-supported
EXPECT !printer-resolution-default
EXPECT !printer-resolution-supported
EXPECT !sides-default IF-DEFINED HAVE_DUPLEX
EXPECT !sides-supported IF-DEFINED HAVE_DUPLEX
}
{
NAME "I-10.5. Get-Printer-Attributes Operation (printer-description)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR keyword requested-attributes 'printer-description'
STATUS successful-ok
# 'media-col-database' attribute should never be returned unless
# explicitly requested...
EXPECT !media-col-database