2 # "$Id: 4.2-cups-printer-ops.test 6379 2007-03-21 14:57:22Z mike $"
4 # Verify that the CUPS printer operations work.
7 # The name of the test...
8 NAME "Add Printer Test1"
10 # The operation to use
11 OPERATION cups-add-printer
14 # The attributes to send
16 ATTR charset attributes-charset utf-8
17 ATTR language attributes-natural-language en
18 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
22 # What statuses are OK?
25 # What attributes do we expect?
26 EXPECT attributes-charset
27 EXPECT attributes-natural-language
30 # The name of the test...
31 NAME "Verify Printer Test1 Added"
33 # The operation to use
34 OPERATION get-printer-attributes
37 # The attributes to send
39 ATTR charset attributes-charset utf-8
40 ATTR language attributes-natural-language en
41 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
43 # What statuses are OK?
46 # What attributes do we expect?
47 EXPECT attributes-charset
48 EXPECT attributes-natural-language
51 # The name of the test...
52 NAME "Delete Printer Test1"
54 # The operation to use
55 OPERATION cups-delete-printer
58 # The attributes to send
60 ATTR charset attributes-charset utf-8
61 ATTR language attributes-natural-language en
62 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
64 # What statuses are OK?
67 # What attributes do we expect?
68 EXPECT attributes-charset
69 EXPECT attributes-natural-language
72 # The name of the test...
73 NAME "Verify Printer Test1 Deleted"
75 # The operation to use
76 OPERATION get-printer-attributes
79 # The attributes to send
81 ATTR charset attributes-charset utf-8
82 ATTR language attributes-natural-language en
83 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
85 # What statuses are OK?
86 STATUS client-error-not-found
88 # What attributes do we expect?
89 EXPECT attributes-charset
90 EXPECT attributes-natural-language
93 # The name of the test...
94 NAME "Subscribe to Printer Events"
96 # The operation to use
97 OPERATION Create-Printer-Subscription
100 # The attributes to send
102 ATTR charset attributes-charset utf-8
103 ATTR language attributes-natural-language en
104 ATTR uri printer-uri $method://$hostname:$port/
105 ATTR name requesting-user-name $user
108 ATTR uri notify-recipient-uri testnotify://
109 ATTR keyword notify-events printer-added,printer-modified,printer-deleted
111 # What statuses are OK?
114 # What attributes do we expect?
115 EXPECT attributes-charset
116 EXPECT attributes-natural-language
117 EXPECT notify-subscription-id
120 # The name of the test...
121 NAME "Add Printer Test2"
123 # The operation to use
124 OPERATION cups-add-printer
127 # The attributes to send
129 ATTR charset attributes-charset utf-8
130 ATTR language attributes-natural-language en
131 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
135 # What statuses are OK?
138 # What attributes do we expect?
139 EXPECT attributes-charset
140 EXPECT attributes-natural-language
143 # The name of the test...
144 NAME "Verify Printer Test2 Added"
146 # The operation to use
147 OPERATION get-printer-attributes
150 # The attributes to send
152 ATTR charset attributes-charset utf-8
153 ATTR language attributes-natural-language en
154 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
156 # What statuses are OK?
159 # What attributes do we expect?
160 EXPECT attributes-charset
161 EXPECT attributes-natural-language
164 # The name of the test...
165 NAME "Modify Printer Test2"
167 # The operation to use
168 OPERATION cups-add-printer
171 # The attributes to send
173 ATTR charset attributes-charset utf-8
174 ATTR language attributes-natural-language en
175 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
178 ATTR uri device-uri file:/tmp/Test2
179 ATTR enum printer-state 3
180 ATTR boolean printer-is-accepting-jobs true
182 # What statuses are OK?
185 # What attributes do we expect?
186 EXPECT attributes-charset
187 EXPECT attributes-natural-language
190 # The name of the test...
191 NAME "Re-Add Printer Test1"
193 # The operation to use
194 OPERATION cups-add-printer
197 # The attributes to send
199 ATTR charset attributes-charset utf-8
200 ATTR language attributes-natural-language en
201 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
204 ATTR uri device-uri file:/tmp/Test1
205 ATTR enum printer-state 3
206 ATTR boolean printer-is-accepting-jobs true
210 # What statuses are OK?
213 # What attributes do we expect?
214 EXPECT attributes-charset
215 EXPECT attributes-natural-language
218 # The name of the test...
219 NAME "Verify Printer Test1 Re-Added"
221 # The operation to use
222 OPERATION get-printer-attributes
225 # The attributes to send
227 ATTR charset attributes-charset utf-8
228 ATTR language attributes-natural-language en
229 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
231 # What statuses are OK?
234 # What attributes do we expect?
235 EXPECT attributes-charset
236 EXPECT attributes-natural-language
239 # The name of the test...
240 NAME "Get Default Printer with no default set"
242 # The operation to use
243 OPERATION cups-get-default
246 # The attributes to send
248 ATTR charset attributes-charset utf-8
249 ATTR language attributes-natural-language en
251 # What statuses are OK?
252 STATUS client-error-not-found
254 # What attributes do we expect?
255 EXPECT attributes-charset
256 EXPECT attributes-natural-language
259 # The name of the test...
260 NAME "Set Default Printer to Test1"
262 # The operation to use
263 OPERATION cups-set-default
266 # The attributes to send
268 ATTR charset attributes-charset utf-8
269 ATTR language attributes-natural-language en
270 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
272 # What statuses are OK?
275 # What attributes do we expect?
276 EXPECT attributes-charset
277 EXPECT attributes-natural-language
280 # The name of the test...
281 NAME "Get Default Printer"
283 # The operation to use
284 OPERATION cups-get-default
287 # The attributes to send
289 ATTR charset attributes-charset utf-8
290 ATTR language attributes-natural-language en
292 # What statuses are OK?
295 # What attributes do we expect?
296 EXPECT attributes-charset
297 EXPECT attributes-natural-language
299 EXPECT printer-uri-supported
302 # The name of the test...
303 NAME "Get IPP/2.x Attributes for Printer Test1"
305 # The operation to use
306 OPERATION get-printer-attributes
309 # The IPP version to use
312 # The attributes to send
314 ATTR charset attributes-charset utf-8
315 ATTR language attributes-natural-language en
316 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
318 # What statuses are OK?
321 # What attributes do we expect?
322 EXPECT media-col-default
326 # End of "$Id: 4.2-cups-printer-ops.test 6379 2007-03-21 14:57:22Z mike $"