]> git.ipfire.org Git - thirdparty/cups.git/blame - test/4.3-job-ops.test
Update test suite for new location of test files.
[thirdparty/cups.git] / test / 4.3-job-ops.test
CommitLineData
ef416fc2 1#
191be31c 2# Verify that the IPP job operations work.
ef416fc2 3#
feb13eea 4# Copyright © 2007-2019 by Apple Inc.
191be31c
MS
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.
ef416fc2 9#
3dfe78b3
MS
10{
11 # The name of the test...
12 NAME "Print PostScript Job with bad job-sheets value to Test1"
13
14 # The operation to use
15 OPERATION print-job
16 RESOURCE /printers/Test1
17
18 # The attributes to send
19 GROUP operation
20 ATTR charset attributes-charset utf-8
21 ATTR language attributes-natural-language en
22 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
23 ATTR name requesting-user-name $user
24 ATTR name job-sheets "none\,none"
25
feb13eea 26 FILE ../examples/testfile.ps
3dfe78b3
MS
27
28 # What statuses are OK?
29 STATUS client-error-bad-request
30}
ef416fc2 31{
32 # The name of the test...
33 NAME "Print PostScript Job to Test1"
34
35 # The operation to use
36 OPERATION print-job
37 RESOURCE /printers/Test1
38
39 # The attributes to send
40 GROUP operation
41 ATTR charset attributes-charset utf-8
42 ATTR language attributes-natural-language en
43 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
44 ATTR name requesting-user-name $user
45
feb13eea 46 FILE ../examples/testfile.ps
ef416fc2 47
48 # What statuses are OK?
49 STATUS successful-ok
50
51 # What attributes do we expect?
52 EXPECT attributes-charset
53 EXPECT attributes-natural-language
54 EXPECT job-id
55}
56{
57 # The name of the test...
58 NAME "Get Job Attributes"
59
60 # The operation to use
61 OPERATION get-job-attributes
62 RESOURCE /jobs
63
64 # The attributes to send
65 GROUP operation
66 ATTR charset attributes-charset utf-8
67 ATTR language attributes-natural-language en
68 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
69 ATTR integer job-id $job-id
70
71 # What statuses are OK?
72 STATUS successful-ok
73
74 # What attributes do we expect?
75 EXPECT attributes-charset
76 EXPECT attributes-natural-language
77 EXPECT job-id
78 EXPECT job-uri
79 EXPECT job-state
80}
81{
82 # The name of the test...
a74454a7 83 NAME "Print JPEG Job to Test2"
ef416fc2 84
85 # The operation to use
86 OPERATION print-job
87 RESOURCE /printers/Test2
88
89 # The attributes to send
90 GROUP operation
91 ATTR charset attributes-charset utf-8
92 ATTR language attributes-natural-language en
93 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
94 ATTR name requesting-user-name $user
95
96 GROUP subscription
3dfe78b3 97 ATTR uri notify-recipient-uri testnotify:///
ef416fc2 98
feb13eea 99 FILE ../examples/testfile.jpg
ef416fc2 100
101 # What statuses are OK?
102 STATUS successful-ok
103
104 # What attributes do we expect?
105 EXPECT attributes-charset
106 EXPECT attributes-natural-language
107 EXPECT job-id
108 EXPECT notify-subscription-id
109}
110{
111 # The name of the test...
112 NAME "Get Job Attributes"
113
114 # The operation to use
115 OPERATION get-job-attributes
116 RESOURCE /jobs
117
118 # The attributes to send
119 GROUP operation
120 ATTR charset attributes-charset utf-8
121 ATTR language attributes-natural-language en
122 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
123 ATTR integer job-id $job-id
124
125 # What statuses are OK?
126 STATUS successful-ok
127
128 # What attributes do we expect?
129 EXPECT attributes-charset
130 EXPECT attributes-natural-language
131 EXPECT job-id
132 EXPECT job-uri
133 EXPECT job-state
134}
135{
136 # The name of the test...
137 NAME "Print Text Job to Test1"
138
139 # The operation to use
140 OPERATION print-job
141 RESOURCE /printers/Test1
142
143 # The attributes to send
144 GROUP operation
145 ATTR charset attributes-charset utf-8
146 ATTR language attributes-natural-language en
147 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
148 ATTR name requesting-user-name $user
149
feb13eea 150 FILE ../examples/testfile.txt
ef416fc2 151
152 # What statuses are OK?
153 STATUS successful-ok
154
155 # What attributes do we expect?
156 EXPECT attributes-charset
157 EXPECT attributes-natural-language
158 EXPECT job-id
159}
160{
161 # The name of the test...
162 NAME "Print PDF Job to Test1"
163
164 # The operation to use
165 OPERATION print-job
166 RESOURCE /printers/Test1
167
168 # The attributes to send
169 GROUP operation
170 ATTR charset attributes-charset utf-8
171 ATTR language attributes-natural-language en
172 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
173 ATTR name requesting-user-name $user
174
969307f0
MS
175 GROUP job
176 ATTR keyword job-hold-until weekend
177
feb13eea 178 FILE ../examples/testfile.pdf
ef416fc2 179
180 # What statuses are OK?
181 STATUS successful-ok
182
183 # What attributes do we expect?
184 EXPECT attributes-charset
185 EXPECT attributes-natural-language
186 EXPECT job-id
187}
188{
189 # The name of the test...
839a51c8 190 NAME "Hold Job on Test1"
ef416fc2 191
192 # The operation to use
839a51c8 193 OPERATION hold-job
ef416fc2 194 RESOURCE /printers/Test1
195
196 # The attributes to send
197 GROUP operation
198 ATTR charset attributes-charset utf-8
199 ATTR language attributes-natural-language en
200 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
839a51c8 201 ATTR integer job-id $job-id
ef416fc2 202 ATTR name requesting-user-name $user
203
ef416fc2 204 # What statuses are OK?
205 STATUS successful-ok
206
207 # What attributes do we expect?
208 EXPECT attributes-charset
209 EXPECT attributes-natural-language
ef416fc2 210}
211{
212 # The name of the test...
839a51c8 213 NAME "Release Job on Test1"
ef416fc2 214
215 # The operation to use
839a51c8 216 OPERATION release-job
ef416fc2 217 RESOURCE /printers/Test1
218
219 # The attributes to send
220 GROUP operation
221 ATTR charset attributes-charset utf-8
222 ATTR language attributes-natural-language en
223 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
224 ATTR integer job-id $job-id
225 ATTR name requesting-user-name $user
226
227 # What statuses are OK?
228 STATUS successful-ok
229
230 # What attributes do we expect?
231 EXPECT attributes-charset
232 EXPECT attributes-natural-language
233}
234{
235 # The name of the test...
839a51c8 236 NAME "Print Held Image Job to Test1"
ef416fc2 237
238 # The operation to use
839a51c8 239 OPERATION print-job
ef416fc2 240 RESOURCE /printers/Test1
241
242 # The attributes to send
243 GROUP operation
244 ATTR charset attributes-charset utf-8
245 ATTR language attributes-natural-language en
246 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
ef416fc2 247 ATTR name requesting-user-name $user
839a51c8
MS
248 GROUP job
249 ATTR keyword job-hold-until indefinite
250
feb13eea 251 FILE ../examples/testfile.jpg
ef416fc2 252
253 # What statuses are OK?
254 STATUS successful-ok
255
256 # What attributes do we expect?
257 EXPECT attributes-charset
258 EXPECT attributes-natural-language
839a51c8 259 EXPECT job-id
ef416fc2 260}
261{
262 # The name of the test...
839a51c8 263 NAME "Cancel Job"
ef416fc2 264
265 # The operation to use
839a51c8
MS
266 OPERATION cancel-job
267 RESOURCE /jobs
ef416fc2 268
269 # The attributes to send
270 GROUP operation
271 ATTR charset attributes-charset utf-8
272 ATTR language attributes-natural-language en
839a51c8
MS
273 ATTR uri job-uri $method://$hostname:$port/jobs/$job-id
274 ATTR name requesting-user-name $user
ef416fc2 275
276 # What statuses are OK?
277 STATUS successful-ok
278
279 # What attributes do we expect?
280 EXPECT attributes-charset
281 EXPECT attributes-natural-language
282}
283{
284 # The name of the test...
839a51c8 285 NAME "Get Job List on Test1"
ef416fc2 286
287 # The operation to use
288 OPERATION get-jobs
839a51c8 289 RESOURCE /printers/Test1
ef416fc2 290
291 # The attributes to send
292 GROUP operation
293 ATTR charset attributes-charset utf-8
294 ATTR language attributes-natural-language en
839a51c8 295 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
ef416fc2 296
297 # What statuses are OK?
298 STATUS successful-ok
299
300 # What attributes do we expect?
301 EXPECT attributes-charset
302 EXPECT attributes-natural-language
5a662dc0 303 EXPECT !job-printer-uri
ef416fc2 304}
305{
306 # The name of the test...
839a51c8 307 NAME "Get All Jobs"
ef416fc2 308
309 # The operation to use
839a51c8 310 OPERATION get-jobs
ef416fc2 311 RESOURCE /jobs
312
313 # The attributes to send
314 GROUP operation
315 ATTR charset attributes-charset utf-8
316 ATTR language attributes-natural-language en
52f6f666 317 ATTR uri printer-uri $scheme://$hostname:$port/
5a662dc0 318 ATTR keyword requested-attributes all
ef416fc2 319
320 # What statuses are OK?
321 STATUS successful-ok
322
323 # What attributes do we expect?
324 EXPECT attributes-charset
325 EXPECT attributes-natural-language
839a51c8
MS
326 EXPECT job-uri
327 EXPECT job-id
328 EXPECT job-state
5a662dc0 329 EXPECT job-printer-uri
ef416fc2 330}