summaryrefslogtreecommitdiff
path: root/examples/set-attrs-hold.test
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-04-26 11:05:27 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-04-26 11:05:27 -0400
commitf1ac9f5889e6a9a8996041ab46e6ca1e0cb8a238 (patch)
treeb28d47f3580aa4ea386b7a09c6c6340f16cdbd80 /examples/set-attrs-hold.test
parenta76950482b3327f096e7188234173d739101aef1 (diff)
downloadcups-f1ac9f5889e6a9a8996041ab46e6ca1e0cb8a238.tar.gz
Move example ipptool files to the examples directory.
Build tools directory for IPP tools.
Diffstat (limited to 'examples/set-attrs-hold.test')
-rw-r--r--examples/set-attrs-hold.test180
1 files changed, 180 insertions, 0 deletions
diff --git a/examples/set-attrs-hold.test b/examples/set-attrs-hold.test
new file mode 100644
index 000000000..213bdd2e2
--- /dev/null
+++ b/examples/set-attrs-hold.test
@@ -0,0 +1,180 @@
+# Test print-job and later job-hold-until attribute
+{
+ # The name of the test...
+ NAME "Disable printer..."
+
+ # The resource to use for the POST
+ RESOURCE /admin/
+
+ # The operation to use
+ OPERATION pause-printer
+
+ # Attributes, starting in the operation group...
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+}
+
+{
+ # The name of the test...
+ NAME "Print job"
+
+ # The resource to use for the POST
+ # RESOURCE /admin
+
+ # The operation to use
+ OPERATION print-job
+
+ # Attributes, starting in the operation group...
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR mimetype document-format application/postscript
+
+ GROUP job
+ ATTR integer copies 1
+
+ FILE ../data/testprint.ps
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+
+ # What attributes do we expect?
+ EXPECT job-id
+ EXPECT job-uri
+}
+
+{
+ # The name of the test...
+ NAME "Get job attrs"
+
+ # The resource to use for the POST
+ RESOURCE /
+
+ # The operation to use
+ OPERATION get-job-attributes
+
+ # Attributes, starting in the operation group...
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $job-id
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+
+ # What attributes do we expect?
+ EXPECT job-state
+ EXPECT job-hold-until
+}
+
+{
+ # The name of the test...
+ NAME "Set job attrs with job-hold-until"
+
+ # The resource to use for the POST
+ # RESOURCE /admin
+
+ # The operation to use
+ OPERATION set-job-attributes
+
+ # Attributes, starting in the operation group...
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $job-id
+ ATTR name requesting-user-name $user
+
+ GROUP job
+ ATTR name job-hold-until 00:30:00
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+}
+
+{
+ # The name of the test...
+ NAME "Get job attrs again"
+
+ # The resource to use for the POST
+ RESOURCE /
+
+ # The operation to use
+ OPERATION get-job-attributes
+
+ # Attributes, starting in the operation group...
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $job-id
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+
+ # What attributes do we expect?
+ EXPECT job-state
+ EXPECT job-hold-until
+}
+
+{
+ # The name of the test...
+ NAME "Enable printer..."
+
+ # The resource to use for the POST
+ RESOURCE /admin/
+
+ # The operation to use
+ OPERATION resume-printer
+
+ # Attributes, starting in the operation group...
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+}
+
+{
+ # The name of the test...
+ NAME "Get job attrs (last time)"
+
+ # The resource to use for the POST
+ RESOURCE /
+
+ # The operation to use
+ OPERATION get-job-attributes
+
+ # Attributes, starting in the operation group...
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $job-id
+
+ # What statuses are OK?
+ STATUS successful-ok
+ STATUS successful-ok-ignored-or-substituted-attributes
+
+ # What attributes do we expect?
+ EXPECT job-state
+ EXPECT job-hold-until
+}