summaryrefslogtreecommitdiff
path: root/examples/fax-job.test
blob: dd35532d039226e7e18ea6012578a0a472ac53a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Fax a test page using Create-Job + Send-Document
#
# Usage:
#
#    ./ipptest -f filename ipp://... fax-job.test
{
	# The name of the test...
	NAME "Create FaxOut Job for 555-1212 and an IPP destination"

	# The operation to use
	OPERATION Create-Job

	# Attributes, starting in the operation group...
	GROUP operation-attributes-tag
	ATTR charset attributes-charset utf-8
	ATTR language attributes-natural-language en
	ATTR uri printer-uri $uri
	ATTR name requesting-user-name $user

	GROUP job-attributes-tag
	ATTR collection destination-uris {
		MEMBER uri destination-uri tel:4055551212
	},{
		MEMBER uri destination-uri ipp://11.22.33.44/ipp/print
		MEMBER enum print-quality 5
		MEMBER keyword media na_letter_8.5x11in
	}

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes

	# What attributes do we expect?
	EXPECT job-id OF-TYPE integer WITH-VALUE >0
	EXPECT job-uri OF-TYPE uri
}
{
	# The name of the test...
	NAME "Send FaxOut Document"

	# The operation to use
	OPERATION Send-Document

	# Attributes, starting in the operation group...
	GROUP operation-attributes-tag
	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
	ATTR mimetype document-format $filetype
	ATTR boolean last-document true

	FILE $filename

	# What statuses are OK?
	STATUS successful-ok
	STATUS successful-ok-ignored-or-substituted-attributes
}