• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Print a test page, expecting the printer to run out of media
2{
3    PAUSE "Remove Paper"
4
5    NAME "Print file expecting media-empty"
6    OPERATION Print-Job
7    GROUP operation-attributes-tag
8	ATTR charset attributes-charset utf-8
9	ATTR language attributes-natural-language en
10	ATTR uri printer-uri $uri
11	ATTR name requesting-user-name $user
12	ATTR mimeMediaType document-format $filetype
13    FILE $filename
14    STATUS successful-ok
15
16    MONITOR-PRINTER-STATE $uri {
17        EXPECT printer-state-reasons WITH-VALUE "/^media-needed/" DEFINE-MATCH HAVE_MEDIA_NEEDED
18    }
19}
20
21{
22    PASS-IF-DEFINED HAVE_MEDIA_NEEDED
23
24    NAME "Wait for media-empty"
25    OPERATION Get-Printer-Attributes
26    GROUP operation-attributes-tag
27	ATTR charset attributes-charset utf-8
28	ATTR language attributes-natural-language en
29	ATTR uri printer-uri $uri
30	ATTR name requesting-user-name $user
31        ATTR keyword requested-attributes printer-state-reasons
32    STATUS successful-ok
33    EXPECT printer-state-reasons WITH-VALUE "/^media-needed/" REPEAT-NO-MATCH
34}
35
36{
37    PAUSE "Load Paper"
38
39    NAME "Wait for no media-empty"
40    OPERATION Get-Printer-Attributes
41    GROUP operation-attributes-tag
42	ATTR charset attributes-charset utf-8
43	ATTR language attributes-natural-language en
44	ATTR uri printer-uri $uri
45	ATTR name requesting-user-name $user
46        ATTR keyword requested-attributes printer-state-reasons
47    STATUS successful-ok
48    EXPECT printer-state-reasons WITH-VALUE "/^media-needed/" REPEAT-MATCH
49}
50