xref: /aosp_15_r20/external/libcups/examples/set-attrs-hold.test (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker# Test print-job and later job-hold-until attribute
2*5e7646d2SAndroid Build Coastguard Worker{
3*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
4*5e7646d2SAndroid Build Coastguard Worker	NAME "Disable printer..."
5*5e7646d2SAndroid Build Coastguard Worker
6*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
7*5e7646d2SAndroid Build Coastguard Worker	RESOURCE /admin/
8*5e7646d2SAndroid Build Coastguard Worker
9*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
10*5e7646d2SAndroid Build Coastguard Worker	OPERATION pause-printer
11*5e7646d2SAndroid Build Coastguard Worker
12*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
13*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
14*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
15*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
16*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
17*5e7646d2SAndroid Build Coastguard Worker	ATTR name requesting-user-name $user
18*5e7646d2SAndroid Build Coastguard Worker
19*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
20*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
21*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
22*5e7646d2SAndroid Build Coastguard Worker}
23*5e7646d2SAndroid Build Coastguard Worker
24*5e7646d2SAndroid Build Coastguard Worker{
25*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
26*5e7646d2SAndroid Build Coastguard Worker	NAME "Print job"
27*5e7646d2SAndroid Build Coastguard Worker
28*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
29*5e7646d2SAndroid Build Coastguard Worker	# RESOURCE /admin
30*5e7646d2SAndroid Build Coastguard Worker
31*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
32*5e7646d2SAndroid Build Coastguard Worker	OPERATION print-job
33*5e7646d2SAndroid Build Coastguard Worker
34*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
35*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
36*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
37*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
38*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
39*5e7646d2SAndroid Build Coastguard Worker	ATTR name requesting-user-name $user
40*5e7646d2SAndroid Build Coastguard Worker	ATTR mimetype document-format application/postscript
41*5e7646d2SAndroid Build Coastguard Worker
42*5e7646d2SAndroid Build Coastguard Worker	GROUP job
43*5e7646d2SAndroid Build Coastguard Worker	ATTR integer copies 1
44*5e7646d2SAndroid Build Coastguard Worker
45*5e7646d2SAndroid Build Coastguard Worker	FILE ../data/testprint.ps
46*5e7646d2SAndroid Build Coastguard Worker
47*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
48*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
49*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
50*5e7646d2SAndroid Build Coastguard Worker
51*5e7646d2SAndroid Build Coastguard Worker	# What attributes do we expect?
52*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-id
53*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-uri
54*5e7646d2SAndroid Build Coastguard Worker}
55*5e7646d2SAndroid Build Coastguard Worker
56*5e7646d2SAndroid Build Coastguard Worker{
57*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
58*5e7646d2SAndroid Build Coastguard Worker	NAME "Get job attrs"
59*5e7646d2SAndroid Build Coastguard Worker
60*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
61*5e7646d2SAndroid Build Coastguard Worker	RESOURCE /
62*5e7646d2SAndroid Build Coastguard Worker
63*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
64*5e7646d2SAndroid Build Coastguard Worker	OPERATION get-job-attributes
65*5e7646d2SAndroid Build Coastguard Worker
66*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
67*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
68*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
69*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
70*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
71*5e7646d2SAndroid Build Coastguard Worker	ATTR integer job-id $job-id
72*5e7646d2SAndroid Build Coastguard Worker
73*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
74*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
75*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
76*5e7646d2SAndroid Build Coastguard Worker
77*5e7646d2SAndroid Build Coastguard Worker	# What attributes do we expect?
78*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-state
79*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-hold-until
80*5e7646d2SAndroid Build Coastguard Worker}
81*5e7646d2SAndroid Build Coastguard Worker
82*5e7646d2SAndroid Build Coastguard Worker{
83*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
84*5e7646d2SAndroid Build Coastguard Worker	NAME "Set job attrs with job-hold-until"
85*5e7646d2SAndroid Build Coastguard Worker
86*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
87*5e7646d2SAndroid Build Coastguard Worker	# RESOURCE /admin
88*5e7646d2SAndroid Build Coastguard Worker
89*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
90*5e7646d2SAndroid Build Coastguard Worker	OPERATION set-job-attributes
91*5e7646d2SAndroid Build Coastguard Worker
92*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
93*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
94*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
95*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
96*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
97*5e7646d2SAndroid Build Coastguard Worker	ATTR integer job-id $job-id
98*5e7646d2SAndroid Build Coastguard Worker	ATTR name requesting-user-name $user
99*5e7646d2SAndroid Build Coastguard Worker
100*5e7646d2SAndroid Build Coastguard Worker	GROUP job
101*5e7646d2SAndroid Build Coastguard Worker	ATTR name job-hold-until 00:30:00
102*5e7646d2SAndroid Build Coastguard Worker
103*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
104*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
105*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
106*5e7646d2SAndroid Build Coastguard Worker}
107*5e7646d2SAndroid Build Coastguard Worker
108*5e7646d2SAndroid Build Coastguard Worker{
109*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
110*5e7646d2SAndroid Build Coastguard Worker	NAME "Get job attrs again"
111*5e7646d2SAndroid Build Coastguard Worker
112*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
113*5e7646d2SAndroid Build Coastguard Worker	RESOURCE /
114*5e7646d2SAndroid Build Coastguard Worker
115*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
116*5e7646d2SAndroid Build Coastguard Worker	OPERATION get-job-attributes
117*5e7646d2SAndroid Build Coastguard Worker
118*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
119*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
120*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
121*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
122*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
123*5e7646d2SAndroid Build Coastguard Worker	ATTR integer job-id $job-id
124*5e7646d2SAndroid Build Coastguard Worker
125*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
126*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
127*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
128*5e7646d2SAndroid Build Coastguard Worker
129*5e7646d2SAndroid Build Coastguard Worker	# What attributes do we expect?
130*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-state
131*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-hold-until
132*5e7646d2SAndroid Build Coastguard Worker}
133*5e7646d2SAndroid Build Coastguard Worker
134*5e7646d2SAndroid Build Coastguard Worker{
135*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
136*5e7646d2SAndroid Build Coastguard Worker	NAME "Enable printer..."
137*5e7646d2SAndroid Build Coastguard Worker
138*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
139*5e7646d2SAndroid Build Coastguard Worker	RESOURCE /admin/
140*5e7646d2SAndroid Build Coastguard Worker
141*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
142*5e7646d2SAndroid Build Coastguard Worker	OPERATION resume-printer
143*5e7646d2SAndroid Build Coastguard Worker
144*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
145*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
146*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
147*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
148*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
149*5e7646d2SAndroid Build Coastguard Worker	ATTR name requesting-user-name $user
150*5e7646d2SAndroid Build Coastguard Worker
151*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
152*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
153*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
154*5e7646d2SAndroid Build Coastguard Worker}
155*5e7646d2SAndroid Build Coastguard Worker
156*5e7646d2SAndroid Build Coastguard Worker{
157*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
158*5e7646d2SAndroid Build Coastguard Worker	NAME "Get job attrs (last time)"
159*5e7646d2SAndroid Build Coastguard Worker
160*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
161*5e7646d2SAndroid Build Coastguard Worker	RESOURCE /
162*5e7646d2SAndroid Build Coastguard Worker
163*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
164*5e7646d2SAndroid Build Coastguard Worker	OPERATION get-job-attributes
165*5e7646d2SAndroid Build Coastguard Worker
166*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
167*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
168*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
169*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
170*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
171*5e7646d2SAndroid Build Coastguard Worker	ATTR integer job-id $job-id
172*5e7646d2SAndroid Build Coastguard Worker
173*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
174*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
175*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
176*5e7646d2SAndroid Build Coastguard Worker
177*5e7646d2SAndroid Build Coastguard Worker	# What attributes do we expect?
178*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-state
179*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-hold-until
180*5e7646d2SAndroid Build Coastguard Worker}
181