]> git.ipfire.org Git - thirdparty/cups.git/blame - test/create-printer-subscription.test
Import CUPS v1.7.1
[thirdparty/cups.git] / test / create-printer-subscription.test
CommitLineData
d1c13e16 1#
61515785 2# "$Id: create-printer-subscription.test 11396 2013-11-06 20:09:03Z msweet $"
d1c13e16 3#
aaf19ab0 4# Create a printer subscription.
d1c13e16 5#
db8b865d 6# Copyright 2007-2013 by Apple Inc.
aaf19ab0
MS
7# Copyright 2001-2006 by Easy Software Products. All rights reserved.
8#
9# These coded instructions, statements, and computer programs are the
10# property of Apple Inc. and are protected by Federal copyright
11# law. Distribution and use rights are outlined in the file "LICENSE.txt"
12# which should have been included with this file. If this file is
13# file is missing or damaged, see the license at "http://www.cups.org/".
14#
15# Usage:
16#
db8b865d 17# ./ipptool [-d recipient=uri] printer-uri create-printer-subscription.test
aaf19ab0
MS
18#
19
d1c13e16
MS
20{
21 # The name of the test...
db8b865d
MS
22 NAME "Create a push printer subscription"
23 SKIP-IF-NOT-DEFINED recipient
d1c13e16
MS
24
25 # The operation to use
26 OPERATION Create-Printer-Subscription
d1c13e16
MS
27
28 # The attributes to send
aaf19ab0 29 GROUP operation-attributes-tag
d1c13e16
MS
30 ATTR charset attributes-charset utf-8
31 ATTR language attributes-natural-language en
32 ATTR uri printer-uri $uri
33
aaf19ab0
MS
34 GROUP subscription-attributes-tag
35 ATTR uri notify-recipient $recipient
db8b865d
MS
36 ATTR keyword notify-events printer-config-changed,printer-state-changed
37
38 # What statuses are OK?
39 STATUS successful-ok
40
41 # What attributes do we expect?
42 EXPECT notify-subscription-id OF-TYPE integer WITH-VALUE >0
43 DISPLAY notify-subscription-id
44}
45
46{
47 # The name of the test...
48 NAME "Create a pull printer subscription"
49 SKIP-IF-DEFINED recipient
50
51 # The operation to use
52 OPERATION Create-Printer-Subscription
53
54 # The attributes to send
55 GROUP operation-attributes-tag
56 ATTR charset attributes-charset utf-8
57 ATTR language attributes-natural-language en
58 ATTR uri printer-uri $uri
59
60 GROUP subscription-attributes-tag
61 ATTR keyword notify-pull-method ippget
62 ATTR keyword notify-events printer-config-changed,printer-state-changed
d1c13e16
MS
63
64 # What statuses are OK?
65 STATUS successful-ok
66
67 # What attributes do we expect?
aaf19ab0 68 EXPECT notify-subscription-id OF-TYPE integer WITH-VALUE >0
d1c13e16
MS
69 DISPLAY notify-subscription-id
70}
71
aaf19ab0 72
d1c13e16 73#
61515785 74# End of "$Id: create-printer-subscription.test 11396 2013-11-06 20:09:03Z msweet $"
d1c13e16 75#