]> git.ipfire.org Git - thirdparty/cups.git/blame - test/4.2-cups-printer-ops.test
Remove svn:keywords since they cause svn_load_dirs.pl to complain about every file.
[thirdparty/cups.git] / test / 4.2-cups-printer-ops.test
CommitLineData
ef416fc2 1#
c07d5b2d 2# "$Id: 4.2-cups-printer-ops.test 177 2006-06-21 00:20:03Z jlovell $"
ef416fc2 3#
4# Verify that the CUPS printer operations work.
5#
6{
7 # The name of the test...
8 NAME "Add Printer Test1"
9
10 # The operation to use
11 OPERATION cups-add-printer
12 RESOURCE /admin/
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
20 FILE testhp.ppd
21
22 # What statuses are OK?
23 STATUS successful-ok
24
25 # What attributes do we expect?
26 EXPECT attributes-charset
27 EXPECT attributes-natural-language
28}
29{
30 # The name of the test...
31 NAME "Verify Printer Test1 Added"
32
33 # The operation to use
34 OPERATION get-printer-attributes
35 RESOURCE /
36
37 # The attributes to send
38 GROUP operation
39 ATTR charset attributes-charset utf-8
40 ATTR language attributes-natural-language en
41 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
42
43 # What statuses are OK?
44 STATUS successful-ok
45
46 # What attributes do we expect?
47 EXPECT attributes-charset
48 EXPECT attributes-natural-language
49}
50{
51 # The name of the test...
52 NAME "Delete Printer Test1"
53
54 # The operation to use
55 OPERATION cups-delete-printer
56 RESOURCE /admin/
57
58 # The attributes to send
59 GROUP operation
60 ATTR charset attributes-charset utf-8
61 ATTR language attributes-natural-language en
62 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
63
64 # What statuses are OK?
65 STATUS successful-ok
66
67 # What attributes do we expect?
68 EXPECT attributes-charset
69 EXPECT attributes-natural-language
70}
71{
72 # The name of the test...
73 NAME "Verify Printer Test1 Deleted"
74
75 # The operation to use
76 OPERATION get-printer-attributes
77 RESOURCE /
78
79 # The attributes to send
80 GROUP operation
81 ATTR charset attributes-charset utf-8
82 ATTR language attributes-natural-language en
83 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
84
85 # What statuses are OK?
86 STATUS client-error-not-found
87
88 # What attributes do we expect?
89 EXPECT attributes-charset
90 EXPECT attributes-natural-language
91}
92{
93 # The name of the test...
94 NAME "Subscribe to Printer Events"
95
96 # The operation to use
97 OPERATION Create-Printer-Subscription
98 RESOURCE /
99
100 # The attributes to send
101 GROUP operation
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
106
107 GROUP subscription
108 ATTR uri notify-recipient testnotify
109 ATTR keyword notify-events printer-added,printer-modified,printer-deleted
110
111 # What statuses are OK?
112 STATUS successful-ok
113
114 # What attributes do we expect?
115 EXPECT attributes-charset
116 EXPECT attributes-natural-language
117 EXPECT notify-subscription-id
118}
119{
120 # The name of the test...
121 NAME "Add Printer Test2"
122
123 # The operation to use
124 OPERATION cups-add-printer
125 RESOURCE /admin/
126
127 # The attributes to send
128 GROUP operation
129 ATTR charset attributes-charset utf-8
130 ATTR language attributes-natural-language en
131 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
132
a74454a7 133 FILE testhp.ppd
ef416fc2 134
135 # What statuses are OK?
136 STATUS successful-ok
137
138 # What attributes do we expect?
139 EXPECT attributes-charset
140 EXPECT attributes-natural-language
141}
142{
143 # The name of the test...
144 NAME "Verify Printer Test2 Added"
145
146 # The operation to use
147 OPERATION get-printer-attributes
148 RESOURCE /
149
150 # The attributes to send
151 GROUP operation
152 ATTR charset attributes-charset utf-8
153 ATTR language attributes-natural-language en
154 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
155
156 # What statuses are OK?
157 STATUS successful-ok
158
159 # What attributes do we expect?
160 EXPECT attributes-charset
161 EXPECT attributes-natural-language
162}
163{
164 # The name of the test...
165 NAME "Modify Printer Test2"
166
167 # The operation to use
168 OPERATION cups-add-printer
169 RESOURCE /admin/
170
171 # The attributes to send
172 GROUP operation
173 ATTR charset attributes-charset utf-8
174 ATTR language attributes-natural-language en
175 ATTR uri printer-uri $method://$hostname:$port/printers/Test2
176
177 GROUP printer
178 ATTR uri device-uri file:/tmp/Test2
179 ATTR enum printer-state 3
180 ATTR boolean printer-is-accepting-jobs true
181
182 # What statuses are OK?
183 STATUS successful-ok
184
185 # What attributes do we expect?
186 EXPECT attributes-charset
187 EXPECT attributes-natural-language
188}
189{
190 # The name of the test...
191 NAME "Re-Add Printer Test1"
192
193 # The operation to use
194 OPERATION cups-add-printer
195 RESOURCE /admin/
196
197 # The attributes to send
198 GROUP operation
199 ATTR charset attributes-charset utf-8
200 ATTR language attributes-natural-language en
201 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
202
203 GROUP printer
204 ATTR uri device-uri file:/tmp/Test1
205 ATTR enum printer-state 3
206 ATTR boolean printer-is-accepting-jobs true
207
a74454a7 208 FILE testps.ppd
ef416fc2 209
210 # What statuses are OK?
211 STATUS successful-ok
212
213 # What attributes do we expect?
214 EXPECT attributes-charset
215 EXPECT attributes-natural-language
216}
217{
218 # The name of the test...
219 NAME "Verify Printer Test1 Re-Added"
220
221 # The operation to use
222 OPERATION get-printer-attributes
223 RESOURCE /
224
225 # The attributes to send
226 GROUP operation
227 ATTR charset attributes-charset utf-8
228 ATTR language attributes-natural-language en
229 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
230
231 # What statuses are OK?
232 STATUS successful-ok
233
234 # What attributes do we expect?
235 EXPECT attributes-charset
236 EXPECT attributes-natural-language
237}
bd7854cb 238{
239 # The name of the test...
240 NAME "Set Default Printer to Test1"
241
242 # The operation to use
243 OPERATION cups-set-default
244 RESOURCE /admin/
245
246 # The attributes to send
247 GROUP operation
248 ATTR charset attributes-charset utf-8
249 ATTR language attributes-natural-language en
250 ATTR uri printer-uri $method://$hostname:$port/printers/Test1
251
252 # What statuses are OK?
253 STATUS successful-ok
254
255 # What attributes do we expect?
256 EXPECT attributes-charset
257 EXPECT attributes-natural-language
258}
ef416fc2 259
260#
c07d5b2d 261# End of "$Id: 4.2-cups-printer-ops.test 177 2006-06-21 00:20:03Z jlovell $"
ef416fc2 262#