]>
Commit | Line | Data |
---|---|---|
f8b3a85b | 1 | # |
1a18c85c | 2 | # "$Id: ipp-2.0.test 11398 2013-11-06 20:11:11Z msweet $" |
f8b3a85b MS |
3 | # |
4 | # IPP/2.0 test suite. | |
5 | # | |
82cc1f9a | 6 | # Copyright 2007-2012 by Apple Inc. |
f8b3a85b MS |
7 | # Copyright 2001-2006 by Easy Software Products. All rights reserved. |
8 | # | |
9 | # These coded instructions, statements, and computer programs are the | |
10 | # property of Apple Inc. and are protected by Federal copyright | |
11 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | # which should have been included with this file. If this file is | |
13 | # file is missing or damaged, see the license at "http://www.cups.org/". | |
14 | # | |
15 | # Usage: | |
16 | # | |
aaf19ab0 | 17 | # ./ipptool -V 2.0 -f filename -t printer-uri ipp-2.0.test |
f8b3a85b MS |
18 | # |
19 | ||
20 | # Do all of the IPP/1.1 tests as an IPP/2.0 client | |
21 | # | |
83e08001 | 22 | # Required by: PWG 5100.12 section 4.3 |
f8b3a85b MS |
23 | INCLUDE "ipp-1.1.test" |
24 | ||
25 | ||
7cf5915e | 26 | # Regular expression for PWG media size names (eek!) |
82cc1f9a | 27 | 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)$$/" |
7cf5915e MS |
28 | |
29 | ||
f8b3a85b MS |
30 | # Test required printer description attribute support. |
31 | # | |
83e08001 | 32 | # Required by: PWG 5100.12 section 6.2 |
f8b3a85b | 33 | { |
83e08001 | 34 | NAME "PWG 5100.12 section 6.2 - Required Printer Description Attributes" |
f8b3a85b MS |
35 | OPERATION Get-Printer-Attributes |
36 | GROUP operation-attributes-tag | |
37 | ATTR charset attributes-charset utf-8 | |
38 | ATTR naturalLanguage attributes-natural-language en | |
39 | ATTR uri printer-uri $uri | |
40 | ATTR name requesting-user-name $user | |
41 | ATTR mimeMediaType document-format application/octet-stream | |
42 | ||
43 | STATUS successful-ok | |
44 | ||
7cf5915e MS |
45 | # Figure out capabilities |
46 | EXPECT color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true DEFINE-MATCH PRINTER_IS_COLOR | |
47 | ||
f8b3a85b | 48 | # Job template attributes |
aaf19ab0 MS |
49 | EXPECT copies-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0 |
50 | EXPECT copies-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag | |
51 | EXPECT finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag | |
52 | EXPECT finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3 | |
d7225fc2 | 53 | EXPECT media-default OF-TYPE no-value|keyword|name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$MEDIA_REGEX" |
82cc1f9a MS |
54 | EXPECT ?media-ready OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$MEDIA_REGEX" |
55 | EXPECT media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$MEDIA_REGEX" | |
d7225fc2 | 56 | EXPECT orientation-requested-default OF-TYPE no-value|enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6 |
aaf19ab0 MS |
57 | EXPECT orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6 |
58 | EXPECT output-bin-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1 | |
59 | EXPECT output-bin-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag | |
60 | EXPECT print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5 | |
61 | EXPECT print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5 | |
62 | EXPECT printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1 | |
63 | EXPECT printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag | |
82cc1f9a MS |
64 | EXPECT sides-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-ALL-VALUES "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/" |
65 | EXPECT sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/" | |
f8b3a85b | 66 | |
d7225fc2 MS |
67 | # Optional media-col support |
68 | EXPECT ?media-col-default OF-TYPE collection IN-GROUP printer-attributes-tag COUNT 1 | |
69 | EXPECT ?media-col-ready OF-TYPE collection IN-GROUP printer-attributes-tag | |
70 | EXPECT ?media-col-supported OF-TYPE keyword IN-GROUP printer-attributes-tag | |
71 | EXPECT media-col-supported WITH-VALUE media-back-coating DEFINE-MATCH HAVE_MEDIA_BACK_COATING | |
72 | EXPECT media-col-supported WITH-VALUE media-color DEFINE-MATCH HAVE_MEDIA_COLOR | |
73 | EXPECT media-col-supported WITH-VALUE media-front-coating DEFINE-MATCH HAVE_MEDIA_FRONT_COATING | |
74 | EXPECT media-col-supported WITH-VALUE media-grain DEFINE-MATCH HAVE_MEDIA_GRAIN | |
75 | EXPECT media-col-supported WITH-VALUE media-hole-count DEFINE-MATCH HAVE_MEDIA_HOLE_COUNT | |
76 | EXPECT media-col-supported WITH-VALUE media-info DEFINE-MATCH HAVE_MEDIA_INFO | |
77 | EXPECT media-col-supported WITH-VALUE media-key DEFINE-MATCH HAVE_MEDIA_KEY | |
78 | EXPECT media-col-supported WITH-VALUE media-order-count DEFINE-MATCH HAVE_MEDIA_ORDER_COUNT | |
79 | EXPECT media-col-supported WITH-VALUE media-pre-printed DEFINE-MATCH HAVE_MEDIA_PRE_PRINTED | |
80 | EXPECT media-col-supported WITH-VALUE media-recycled DEFINE-MATCH HAVE_MEDIA_RECYCLED | |
81 | EXPECT media-col-supported WITH-VALUE media-size DEFINE-MATCH HAVE_MEDIA_SIZE | |
82 | EXPECT media-col-supported WITH-VALUE media-tooth DEFINE-MATCH HAVE_MEDIA_TOOTH | |
83 | EXPECT media-col-supported WITH-VALUE media-type DEFINE-MATCH HAVE_MEDIA_TYPE | |
84 | EXPECT media-col-supported WITH-VALUE media-weight-metric DEFINE-MATCH HAVE_MEDIA_WEIGHT_METRIC | |
85 | ||
86 | EXPECT media-back-coating-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_BACK_COATING | |
87 | EXPECT media-color-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_COLOR | |
88 | EXPECT media-front-coating-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_FRONT_COATING | |
89 | EXPECT media-grain-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_GRAIN | |
90 | EXPECT media-hole-count-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag WITH-VALUE >-1 IF-DEFINED HAVE_MEDIA_HOLE_COUNT | |
91 | EXPECT media-info-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_INFO | |
92 | EXPECT media-key-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_KEY | |
93 | EXPECT media-order-count-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag WITH-VALUE >0 IF-DEFINED HAVE_MEDIA_ORDER_COUNT | |
94 | EXPECT media-pre-printed-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_PRE_PRINTED | |
95 | EXPECT media-recycled-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_RECYCLED | |
96 | EXPECT media-size-supported OF-TYPE collection IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_SIZE | |
97 | EXPECT media-tooth-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_TOOTH | |
98 | EXPECT media-type-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_MEDIA_TYPE | |
99 | EXPECT media-weight-metric-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag WITH-VALUE >-1 IF-DEFINED HAVE_MEDIA_WEIGHT_METRIC | |
100 | ||
f8b3a85b | 101 | # Printer description attributes |
aaf19ab0 MS |
102 | EXPECT color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 |
103 | EXPECT pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 | |
7cf5915e MS |
104 | EXPECT pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED PRINTER_IS_COLOR |
105 | EXPECT !pages-per-minute-color IF-NOT-DEFINED PRINTER_IS_COLOR | |
aaf19ab0 MS |
106 | EXPECT printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/" |
107 | EXPECT printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/" | |
108 | EXPECT printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/" | |
109 | EXPECT printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 | |
f8b3a85b MS |
110 | } |
111 | ||
112 | ||
113 | # | |
1a18c85c | 114 | # End of "$Id: ipp-2.0.test 11398 2013-11-06 20:11:11Z msweet $". |
f8b3a85b | 115 | # |