xref: /aosp_15_r20/external/libcups/examples/create-job-format.test (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker# Print a test page using create-job + send-document, specifying the
2*5e7646d2SAndroid Build Coastguard Worker# document format.
3*5e7646d2SAndroid Build Coastguard Worker{
4*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
5*5e7646d2SAndroid Build Coastguard Worker	NAME "Print test page using create-job"
6*5e7646d2SAndroid Build Coastguard Worker
7*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
8*5e7646d2SAndroid Build Coastguard Worker	# RESOURCE /admin
9*5e7646d2SAndroid Build Coastguard Worker
10*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
11*5e7646d2SAndroid Build Coastguard Worker	OPERATION create-job
12*5e7646d2SAndroid Build Coastguard Worker
13*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
14*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
15*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
16*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
17*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
18*5e7646d2SAndroid Build Coastguard Worker	ATTR name requesting-user-name $user
19*5e7646d2SAndroid Build Coastguard Worker
20*5e7646d2SAndroid Build Coastguard Worker	GROUP job
21*5e7646d2SAndroid Build Coastguard Worker	ATTR integer copies 1
22*5e7646d2SAndroid Build Coastguard Worker
23*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
24*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
25*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
26*5e7646d2SAndroid Build Coastguard Worker
27*5e7646d2SAndroid Build Coastguard Worker	# What attributes do we expect?
28*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-id
29*5e7646d2SAndroid Build Coastguard Worker	EXPECT job-uri
30*5e7646d2SAndroid Build Coastguard Worker}
31*5e7646d2SAndroid Build Coastguard Worker{
32*5e7646d2SAndroid Build Coastguard Worker	# The name of the test...
33*5e7646d2SAndroid Build Coastguard Worker	NAME "... and send-document"
34*5e7646d2SAndroid Build Coastguard Worker
35*5e7646d2SAndroid Build Coastguard Worker	# The resource to use for the POST
36*5e7646d2SAndroid Build Coastguard Worker	# RESOURCE /admin
37*5e7646d2SAndroid Build Coastguard Worker
38*5e7646d2SAndroid Build Coastguard Worker	# The operation to use
39*5e7646d2SAndroid Build Coastguard Worker	OPERATION send-document
40*5e7646d2SAndroid Build Coastguard Worker
41*5e7646d2SAndroid Build Coastguard Worker	# Attributes, starting in the operation group...
42*5e7646d2SAndroid Build Coastguard Worker	GROUP operation
43*5e7646d2SAndroid Build Coastguard Worker	ATTR charset attributes-charset utf-8
44*5e7646d2SAndroid Build Coastguard Worker	ATTR language attributes-natural-language en
45*5e7646d2SAndroid Build Coastguard Worker	ATTR uri printer-uri $uri
46*5e7646d2SAndroid Build Coastguard Worker	ATTR integer job-id $job-id
47*5e7646d2SAndroid Build Coastguard Worker	ATTR name requesting-user-name $user
48*5e7646d2SAndroid Build Coastguard Worker	ATTR mimetype document-format application/postscript
49*5e7646d2SAndroid Build Coastguard Worker	ATTR boolean last-document true
50*5e7646d2SAndroid Build Coastguard Worker
51*5e7646d2SAndroid Build Coastguard Worker	FILE ../data/testprint.ps
52*5e7646d2SAndroid Build Coastguard Worker
53*5e7646d2SAndroid Build Coastguard Worker	# What statuses are OK?
54*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok
55*5e7646d2SAndroid Build Coastguard Worker	STATUS successful-ok-ignored-or-substituted-attributes
56*5e7646d2SAndroid Build Coastguard Worker}
57