#
-# "$Id: 4.3-job-ops.test 6379 2007-03-21 14:57:22Z mike $"
+# Verify that the IPP job operations work.
#
-# Verify that the IPP job operations work.
+# Copyright © 2007-2019 by Apple Inc.
+# Copyright © 2001-2006 by Easy Software Products. All rights reserved.
#
+# Licensed under Apache License v2.0. See the file "LICENSE" for more
+# information.
+#
+{
+ # The name of the test...
+ NAME "Print PostScript Job with bad job-sheets value to Test1"
+
+ # The operation to use
+ OPERATION print-job
+ RESOURCE /printers/Test1
+
+ # The attributes to send
+ GROUP operation
+ ATTR charset attributes-charset utf-8
+ ATTR language attributes-natural-language en
+ ATTR uri printer-uri $method://$hostname:$port/printers/Test1
+ ATTR name requesting-user-name $user
+ ATTR name job-sheets "none\,none"
+
+ FILE ../examples/testfile.ps
+
+ # What statuses are OK?
+ STATUS client-error-bad-request
+}
{
# The name of the test...
NAME "Print PostScript Job to Test1"
ATTR uri printer-uri $method://$hostname:$port/printers/Test1
ATTR name requesting-user-name $user
- FILE testfile.ps
+ FILE ../examples/testfile.ps
# What statuses are OK?
STATUS successful-ok
ATTR name requesting-user-name $user
GROUP subscription
- ATTR uri notify-recipient-uri testnotify
+ ATTR uri notify-recipient-uri testnotify:///
- FILE testfile.jpg
+ FILE ../examples/testfile.jpg
# What statuses are OK?
STATUS successful-ok
ATTR uri printer-uri $method://$hostname:$port/printers/Test1
ATTR name requesting-user-name $user
- FILE testfile.txt
+ FILE ../examples/testfile.txt
# What statuses are OK?
STATUS successful-ok
ATTR uri printer-uri $method://$hostname:$port/printers/Test1
ATTR name requesting-user-name $user
- FILE testfile.pdf
+ GROUP job
+ ATTR keyword job-hold-until weekend
+
+ FILE ../examples/testfile.pdf
# What statuses are OK?
STATUS successful-ok
}
{
# The name of the test...
- NAME "Print Image Job to Test1"
+ NAME "Hold Job on Test1"
# The operation to use
- OPERATION print-job
+ OPERATION hold-job
RESOURCE /printers/Test1
# The attributes to send
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $method://$hostname:$port/printers/Test1
+ ATTR integer job-id $job-id
ATTR name requesting-user-name $user
- FILE testfile.jpg
-
# What statuses are OK?
STATUS successful-ok
# What attributes do we expect?
EXPECT attributes-charset
EXPECT attributes-natural-language
- EXPECT job-id
}
{
# The name of the test...
- NAME "Hold Job on Test1"
+ NAME "Release Job on Test1"
# The operation to use
- OPERATION hold-job
+ OPERATION release-job
RESOURCE /printers/Test1
# The attributes to send
}
{
# The name of the test...
- NAME "Release Job on Test1"
+ NAME "Print Held Image Job to Test1"
# The operation to use
- OPERATION release-job
+ OPERATION print-job
RESOURCE /printers/Test1
# The attributes to send
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $method://$hostname:$port/printers/Test1
- ATTR integer job-id $job-id
ATTR name requesting-user-name $user
+ GROUP job
+ ATTR keyword job-hold-until indefinite
+
+ FILE ../examples/testfile.jpg
# What statuses are OK?
STATUS successful-ok
# What attributes do we expect?
EXPECT attributes-charset
EXPECT attributes-natural-language
+ EXPECT job-id
}
{
# The name of the test...
- NAME "Get Job List on Test1"
+ NAME "Cancel Job"
# The operation to use
- OPERATION get-jobs
- RESOURCE /printers/Test1
+ OPERATION cancel-job
+ RESOURCE /jobs
# The attributes to send
GROUP operation
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
- ATTR uri printer-uri $method://$hostname:$port/printers/Test1
+ ATTR uri job-uri $method://$hostname:$port/jobs/$job-id
+ ATTR name requesting-user-name $user
# What statuses are OK?
STATUS successful-ok
}
{
# The name of the test...
- NAME "Get All Jobs"
+ NAME "Get Job List on Test1"
# The operation to use
OPERATION get-jobs
- RESOURCE /jobs
+ RESOURCE /printers/Test1
# The attributes to send
GROUP operation
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
- ATTR uri job-uri $method://$hostname:$port/jobs
+ ATTR uri printer-uri $method://$hostname:$port/printers/Test1
# What statuses are OK?
STATUS successful-ok
# What attributes do we expect?
EXPECT attributes-charset
EXPECT attributes-natural-language
- EXPECT job-uri
- EXPECT job-id
- EXPECT job-state
+ EXPECT !job-printer-uri
}
{
# The name of the test...
- NAME "Cancel Job"
+ NAME "Get All Jobs"
# The operation to use
- OPERATION cancel-job
+ OPERATION get-jobs
RESOURCE /jobs
# The attributes to send
GROUP operation
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
- ATTR uri job-uri $method://$hostname:$port/jobs/$job-id
- ATTR name requesting-user-name $user
+ ATTR uri printer-uri $scheme://$hostname:$port/
+ ATTR keyword requested-attributes all
# What statuses are OK?
STATUS successful-ok
# What attributes do we expect?
EXPECT attributes-charset
EXPECT attributes-natural-language
+ EXPECT job-uri
+ EXPECT job-id
+ EXPECT job-state
+ EXPECT job-printer-uri
}
-
-#
-# End of "$Id: 4.3-job-ops.test 6379 2007-03-21 14:57:22Z mike $"
-#