# resume-printer-somehow.test - include file to Resume the Printer somehow # Version 0.2 # Last revised by Xerox Corporation on 99-03-02. # Copyright (c) 1999 by Xerox Corporation. All rights reserved. # User is granted the right to modify this file for use with # the IPP Server Test Tool, as described in the file # LICENSE-IppTest.txt. # Resume printer either by using the Printer's Resume-Printer operation # if the global symbol USE-PAUSE-PRINTER is defined, # or manually by prompting the person running the scripts to "resume" # the printer by closing a door, using the local console, or some # other means and waiting for the user to type the keyword response: # p in order to proceed with the test. # Assumes the following global symbols are defined: # $USE-PAUSE-PRINTER - defined if Resume-Printer is to be used # $target - the target printer # The requesting-user-name is assumed to be 'user 1'. IfDef USE-PAUSE-PRINTER Resume-Printer \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ requesting-user-name: 'user 1', \ ) \ ) Expect Response \ status-code: successful-ok, \ attributes: (...) # Get Printer state Get-Printer-Attributes \ target: $target, \ attributes: ( \ Operation: ( \ attributes-charset: utf-8, \ attributes-natural-language: en-us, \ printer-uri: $target, \ requested-attributes: \ ) \ ) # Check to see if the Printer is no longer 'stopped' # Could be 'processing' or 'idle' # Or printer-state-reasons might not be supported Expect Response \ status-code: successful-ok | \ successful-ok-ignored-or-substituted-attributes, \ attributes: ( \ Operation: ( ... ), \ Printer: ( \ printer-state: processing | idle, \ ), \ ... \ ) Else Echo Resume the Printer so that the next job submitted can print Echo Type 'p' or 'P' when the printer is unpaused Read Symbol tmp p | P EndIf