Haibo Huang | 4c28362 | 2019-12-13 16:47:52 -0800 | [diff] [blame] | 1 | # Create a printer subscription. |
| 2 | # |
| 3 | # Usage: |
| 4 | # |
| 5 | # ./ipptool [-d recipient=uri] printer-uri create-printer-subscription.test |
| 6 | { |
| 7 | # The name of the test... |
| 8 | NAME "Create a push printer subscription" |
| 9 | SKIP-IF-NOT-DEFINED recipient |
| 10 | |
| 11 | # The operation to use |
| 12 | OPERATION Create-Printer-Subscription |
| 13 | |
| 14 | # The attributes to send |
| 15 | GROUP operation-attributes-tag |
| 16 | ATTR charset attributes-charset utf-8 |
| 17 | ATTR language attributes-natural-language en |
| 18 | ATTR uri printer-uri $uri |
| 19 | |
| 20 | GROUP subscription-attributes-tag |
| 21 | ATTR uri notify-recipient-uri $recipient |
| 22 | ATTR keyword notify-events printer-config-changed,printer-state-changed |
| 23 | |
| 24 | # What statuses are OK? |
| 25 | STATUS successful-ok |
| 26 | |
| 27 | # What attributes do we expect? |
| 28 | EXPECT notify-subscription-id OF-TYPE integer WITH-VALUE >0 |
| 29 | DISPLAY notify-subscription-id |
| 30 | } |
| 31 | |
| 32 | { |
| 33 | # The name of the test... |
| 34 | NAME "Create a pull printer subscription" |
| 35 | SKIP-IF-DEFINED recipient |
| 36 | |
| 37 | # The operation to use |
| 38 | OPERATION Create-Printer-Subscription |
| 39 | |
| 40 | # The attributes to send |
| 41 | GROUP operation-attributes-tag |
| 42 | ATTR charset attributes-charset utf-8 |
| 43 | ATTR language attributes-natural-language en |
| 44 | ATTR uri printer-uri $uri |
| 45 | |
| 46 | GROUP subscription-attributes-tag |
| 47 | ATTR keyword notify-pull-method ippget |
| 48 | ATTR keyword notify-events printer-config-changed,printer-state-changed |
| 49 | |
| 50 | # What statuses are OK? |
| 51 | STATUS successful-ok |
| 52 | |
| 53 | # What attributes do we expect? |
| 54 | EXPECT notify-subscription-id OF-TYPE integer WITH-VALUE >0 |
| 55 | DISPLAY notify-subscription-id |
| 56 | } |