]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
2 | # "$Id: 4.3-job-ops.test 4837 2005-11-14 04:13:13Z mike $" | |
3 | # | |
4 | # Verify that the IPP job operations work. | |
5 | # | |
6 | { | |
7 | # The name of the test... | |
8 | NAME "Print PostScript Job 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 | ||
21 | FILE testfile.ps | |
22 | ||
23 | # What statuses are OK? | |
24 | STATUS successful-ok | |
25 | ||
26 | # What attributes do we expect? | |
27 | EXPECT attributes-charset | |
28 | EXPECT attributes-natural-language | |
29 | EXPECT job-id | |
30 | } | |
31 | { | |
32 | # The name of the test... | |
33 | NAME "Get Job Attributes" | |
34 | ||
35 | # The operation to use | |
36 | OPERATION get-job-attributes | |
37 | RESOURCE /jobs | |
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 integer job-id $job-id | |
45 | ||
46 | # What statuses are OK? | |
47 | STATUS successful-ok | |
48 | ||
49 | # What attributes do we expect? | |
50 | EXPECT attributes-charset | |
51 | EXPECT attributes-natural-language | |
52 | EXPECT job-id | |
53 | EXPECT job-uri | |
54 | EXPECT job-state | |
55 | } | |
56 | { | |
57 | # The name of the test... | |
58 | NAME "Print PostScript Job to Test2" | |
59 | ||
60 | # The operation to use | |
61 | OPERATION print-job | |
62 | RESOURCE /printers/Test2 | |
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/Test2 | |
69 | ATTR name requesting-user-name $user | |
70 | ||
71 | GROUP subscription | |
72 | ATTR uri notify-recipient testnotify | |
73 | ||
74 | FILE testfile.ps | |
75 | ||
76 | # What statuses are OK? | |
77 | STATUS successful-ok | |
78 | ||
79 | # What attributes do we expect? | |
80 | EXPECT attributes-charset | |
81 | EXPECT attributes-natural-language | |
82 | EXPECT job-id | |
83 | EXPECT notify-subscription-id | |
84 | } | |
85 | { | |
86 | # The name of the test... | |
87 | NAME "Get Job Attributes" | |
88 | ||
89 | # The operation to use | |
90 | OPERATION get-job-attributes | |
91 | RESOURCE /jobs | |
92 | ||
93 | # The attributes to send | |
94 | GROUP operation | |
95 | ATTR charset attributes-charset utf-8 | |
96 | ATTR language attributes-natural-language en | |
97 | ATTR uri printer-uri $method://$hostname:$port/printers/Test2 | |
98 | ATTR integer job-id $job-id | |
99 | ||
100 | # What statuses are OK? | |
101 | STATUS successful-ok | |
102 | ||
103 | # What attributes do we expect? | |
104 | EXPECT attributes-charset | |
105 | EXPECT attributes-natural-language | |
106 | EXPECT job-id | |
107 | EXPECT job-uri | |
108 | EXPECT job-state | |
109 | } | |
110 | { | |
111 | # The name of the test... | |
112 | NAME "Print Text Job to Test1" | |
113 | ||
114 | # The operation to use | |
115 | OPERATION print-job | |
116 | RESOURCE /printers/Test1 | |
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/Test1 | |
123 | ATTR name requesting-user-name $user | |
124 | ||
125 | FILE testfile.txt | |
126 | ||
127 | # What statuses are OK? | |
128 | STATUS successful-ok | |
129 | ||
130 | # What attributes do we expect? | |
131 | EXPECT attributes-charset | |
132 | EXPECT attributes-natural-language | |
133 | EXPECT job-id | |
134 | } | |
135 | { | |
136 | # The name of the test... | |
137 | NAME "Print PDF 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 | ||
150 | FILE testfile.pdf | |
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 Image 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 | ||
175 | FILE testfile.jpg | |
176 | ||
177 | # What statuses are OK? | |
178 | STATUS successful-ok | |
179 | ||
180 | # What attributes do we expect? | |
181 | EXPECT attributes-charset | |
182 | EXPECT attributes-natural-language | |
183 | EXPECT job-id | |
184 | } | |
185 | { | |
186 | # The name of the test... | |
187 | NAME "Hold Job on Test1" | |
188 | ||
189 | # The operation to use | |
190 | OPERATION hold-job | |
191 | RESOURCE /printers/Test1 | |
192 | ||
193 | # The attributes to send | |
194 | GROUP operation | |
195 | ATTR charset attributes-charset utf-8 | |
196 | ATTR language attributes-natural-language en | |
197 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
198 | ATTR integer job-id $job-id | |
199 | ATTR name requesting-user-name $user | |
200 | ||
201 | # What statuses are OK? | |
202 | STATUS successful-ok | |
203 | ||
204 | # What attributes do we expect? | |
205 | EXPECT attributes-charset | |
206 | EXPECT attributes-natural-language | |
207 | } | |
208 | { | |
209 | # The name of the test... | |
210 | NAME "Release Job on Test1" | |
211 | ||
212 | # The operation to use | |
213 | OPERATION release-job | |
214 | RESOURCE /printers/Test1 | |
215 | ||
216 | # The attributes to send | |
217 | GROUP operation | |
218 | ATTR charset attributes-charset utf-8 | |
219 | ATTR language attributes-natural-language en | |
220 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
221 | ATTR integer job-id $job-id | |
222 | ATTR name requesting-user-name $user | |
223 | ||
224 | # What statuses are OK? | |
225 | STATUS successful-ok | |
226 | ||
227 | # What attributes do we expect? | |
228 | EXPECT attributes-charset | |
229 | EXPECT attributes-natural-language | |
230 | } | |
231 | { | |
232 | # The name of the test... | |
233 | NAME "Get Job List on Test1" | |
234 | ||
235 | # The operation to use | |
236 | OPERATION get-jobs | |
237 | RESOURCE /printers/Test1 | |
238 | ||
239 | # The attributes to send | |
240 | GROUP operation | |
241 | ATTR charset attributes-charset utf-8 | |
242 | ATTR language attributes-natural-language en | |
243 | ATTR uri printer-uri $method://$hostname:$port/printers/Test1 | |
244 | ||
245 | # What statuses are OK? | |
246 | STATUS successful-ok | |
247 | ||
248 | # What attributes do we expect? | |
249 | EXPECT attributes-charset | |
250 | EXPECT attributes-natural-language | |
251 | } | |
252 | { | |
253 | # The name of the test... | |
254 | NAME "Get All Jobs" | |
255 | ||
256 | # The operation to use | |
257 | OPERATION get-jobs | |
258 | RESOURCE /jobs | |
259 | ||
260 | # The attributes to send | |
261 | GROUP operation | |
262 | ATTR charset attributes-charset utf-8 | |
263 | ATTR language attributes-natural-language en | |
264 | ATTR uri job-uri $method://$hostname:$port/jobs | |
265 | ||
266 | # What statuses are OK? | |
267 | STATUS successful-ok | |
268 | ||
269 | # What attributes do we expect? | |
270 | EXPECT attributes-charset | |
271 | EXPECT attributes-natural-language | |
272 | EXPECT job-uri | |
273 | EXPECT job-id | |
274 | EXPECT job-state | |
275 | } | |
276 | { | |
277 | # The name of the test... | |
278 | NAME "Cancel Job" | |
279 | ||
280 | # The operation to use | |
281 | OPERATION cancel-job | |
282 | RESOURCE /jobs | |
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 job-uri $method://$hostname:$port/jobs/$job-id | |
289 | ATTR name requesting-user-name $user | |
290 | ||
291 | # What statuses are OK? | |
292 | STATUS successful-ok | |
293 | ||
294 | # What attributes do we expect? | |
295 | EXPECT attributes-charset | |
296 | EXPECT attributes-natural-language | |
297 | } | |
298 | ||
299 | # | |
300 | # End of "$Id: 4.3-job-ops.test 4837 2005-11-14 04:13:13Z mike $" | |
301 | # |