]>
Commit | Line | Data |
---|---|---|
191be31c | 1 | # Cancel the currently printing job. |
12f89d24 MS |
2 | # |
3 | # Usage: | |
4 | # | |
5 | # ./ipptool printer-uri cancel-current-jobs.test | |
12f89d24 MS |
6 | { |
7 | # The name of the test... | |
8 | NAME "Get current job" | |
9 | ||
10 | # The operation to use | |
11 | OPERATION Get-Jobs | |
12 | ||
13 | # Attributes, starting in the operation group... | |
14 | GROUP operation-attributes-tag | |
15 | ATTR charset attributes-charset utf-8 | |
16 | ATTR language attributes-natural-language en | |
17 | ATTR uri printer-uri $uri | |
18 | ATTR integer limit 1 | |
19 | ATTR name requesting-user-name $user | |
20 | ATTR keyword requested-attributes job-id,job-state | |
21 | ||
22 | # What statuses are OK? | |
23 | STATUS successful-ok | |
24 | ||
25 | EXPECT job-id OF-TYPE integer COUNT 1 | |
26 | ||
27 | # What attributes to display | |
28 | DISPLAY job-id | |
29 | DISPLAY job-state | |
30 | } | |
31 | ||
32 | { | |
33 | SKIP-IF-NOT-DEFINED job-id | |
34 | NAME "Cancel current job" | |
35 | OPERATION Cancel-Job | |
36 | GROUP operation-attributes-tag | |
37 | ATTR charset attributes-charset utf-8 | |
38 | ATTR language attributes-natural-language en | |
39 | ATTR uri printer-uri $uri | |
40 | ATTR integer job-id $job-id | |
41 | ATTR name requesting-user-name $user | |
42 | ||
43 | # What statuses are OK? | |
44 | STATUS successful-ok | |
45 | } |