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