]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - doc/help/man-ipptoolfile.html
Greatly simplify the man page handling.
[thirdparty/cups.git] / doc / help / man-ipptoolfile.html
index 3fffb25f11d85f8fe1c4c083a5dc4bf87c8c8721..76a57b2267f1dedda9c09aa3f01cbc472dee3fc1 100644 (file)
 ipptoolfile - ipptool file format
 <h2 class="title"><a name="DESCRIPTION">Description</a></h2>
 The
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(1)</a>
-program accepts free-form plain text files that describe one or more IPP requests. Comments start with the "#" character and continue to the end of the line. Each request is enclosed by curly braces, for example:
+<b>ipptool</b>(1)
+program accepts free-form plain text files that describe one or more IPP requests.
+Comments start with the "#" character and continue to the end of the line.
+Each request is enclosed by curly braces, for example:
 <pre class="man">
 
     # This is a comment
     {
       # The name of the test
-      NAME "Print PostScript File"
+      NAME "Print PDF File"
 
       # The request to send
       OPERATION Print-Job
+
       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
-      FILE testfile.ps
+      ATTR mimeMediaType document-format application/pdf
+
+      GROUP job-attributes-tag
+      ATTR collection media-col {
+        # US Letter plain paper from the "main" tray
+        MEMBER collection media-size {
+          MEMBER integer x-dimension 21590
+          MEMBER integer y-dimension 27940
+        }
+        MEMBER integer media-top-margin 423
+        MEMBER integer media-bottom-margin 423
+        MEMBER integer media-left-margin 423
+        MEMBER integer media-right-margin 423
+        MEMBER keyword media-source "main"
+        MEMBER keyword media-type "stationery"
+      }
+
+      FILE testfile.pdf
 
       # The response to expect
       STATUS successful-ok
@@ -36,10 +56,11 @@ program accepts free-form plain text files that describe one or more IPP request
     }
     {
       # The name of the test
-      NAME "Get Attributes of PostScript Job"
+      NAME "Wait for Job to Complete"
 
       # The request to send
       OPERATION Get-Job-Attributes
+
       GROUP operation-attributes-tag
       ATTR charset attributes-charset utf-8
       ATTR language attributes-natural-language en
@@ -51,8 +72,12 @@ program accepts free-form plain text files that describe one or more IPP request
       STATUS successful-ok
       EXPECT job-id OF-TYPE integer WITH-VALUE $job-id
       EXPECT job-uri OF-TYPE uri
-      EXPECT job-state OF-TYPE enum WITH-VALUE 3,4,5,6,7,8,9
+      EXPECT job-state OF-TYPE enum WITH-VALUE >5 REPEAT-NO-MATCH
       EXPECT job-originating-user-name OF-TYPE name WITH-VALUE "$user"
+
+      # Show the job state until completed...
+      DISPLAY job-state
+      DISPLAY job-state-reasons
     }
 </pre>
 <h3><a name="TOP_LEVEL_DIRECTIVES">Top-level Directives</a></h3>
@@ -62,7 +87,7 @@ The following directives can be used outside of a <i>test</i>:
 <dd style="margin-left: 5.0em">Defines a test.
 <dt><b>DEFINE </b><i>variable-name value</i>
 <dd style="margin-left: 5.0em">Defines the named variable to the given value. This is equivalent to specifying <i>-d variable-name=value</i> on the
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 command-line.
 <dt><b>DEFINE-DEFAULT </b><i>variable-name value</i>
 <dd style="margin-left: 5.0em">Defines the named variable to the given value if it does not already have a value.
@@ -71,22 +96,22 @@ command-line.
 <dt><b>IGNORE-ERRORS yes</b>
 <dd style="margin-left: 5.0em"><dt><b>IGNORE-ERRORS no</b>
 <dd style="margin-left: 5.0em">Specifies whether, by default,
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 will ignore errors and continue with subsequent tests.
 <dt><b>INCLUDE "</b><i>filename</i><b>"</b>
 <dd style="margin-left: 5.0em"><dt><b>INCLUDE &lt;</b><i>filename</i><b>></b>
 <dd style="margin-left: 5.0em">Includes another test file. The first form includes a file relative to the current test file, while the second form includes a file from the
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 include directory.
 <dt><b>INCLUDE-IF-DEFINED </b><i>name </i><b>"</b><i>filename</i><b>"</b>
 <dd style="margin-left: 5.0em"><dt><b>INCLUDE-IF-DEFINED </b><i>name </i><b>&lt;</b><i>filename</i><b>></b>
 <dd style="margin-left: 5.0em">Includes another test file if the named variable is defined. The first form includes a file relative to the current test file, while the second form includes a file from the
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 include directory.
 <dt><b>INCLUDE-IF-NOT-DEFINED </b><i>name </i><b>"</b><i>filename</i><b>"</b>
 <dd style="margin-left: 5.0em"><dt><b>INCLUDE-IF-NOT-DEFINED </b><i>name </i><b>&lt;</b><i>filename</i><b>></b>
 <dd style="margin-left: 5.0em">Includes another test file if the named variable is not defined. The first form includes a file relative to the current test file, while the second form includes a file from the
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 include directory.
 <dt><b>SKIP-IF-DEFINED </b><i>variable-name</i>
 <dd style="margin-left: 5.0em"><dt><b>SKIP-IF-NOT-DEFINED </b><i>variable-name</i>
@@ -98,11 +123,11 @@ include directory.
 <dd style="margin-left: 5.0em">Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
 <dt><b>TRANSFER chunked</b>
 <dd style="margin-left: 5.0em">Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: chunked" header. This is the default and is equivalent to specifying <i>-c</i> on the
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 command-line. Support for chunked requests is required for conformance with all versions of IPP.
 <dt><b>TRANSFER length</b>
 <dd style="margin-left: 5.0em">Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" header. This is equivalent to specifying <i>-l</i> on the
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 command-line. Support for content length requests is required for conformance with all versions of IPP.
 <dt><b>VERSION 1.0</b>
 <dd style="margin-left: 5.0em"><dt><b>VERSION 1.1</b>
@@ -114,16 +139,23 @@ command-line. Support for content length requests is required for conformance wi
 <h3><a name="TEST_DIRECTIVES">Test Directives</a></h3>
 The following directives are understood within a <i>test</i>:
 <dl class="man">
-<dt><b>ATTR </b><i>tag attribute-name value(s)</i>
-<dd style="margin-left: 5.0em">Adds an attribute to the test request. Values are separated by the comma (",") character - escape commas using the "" character. Common attributes and values are listed in the IANA IPP registry - see references below.
+<dt><b>ATTR </b><i>out-of-band-tag attribute-name</i>
+<dd style="margin-left: 5.0em"><dt><b>ATTR </b><i>tag attribute-name value(s)</i>
+<dd style="margin-left: 5.0em">Adds an attribute to the test request.
+Out-of-band tags (admin-define, delete-attribute, no-value, not-settable, unknown, unsupported) have no value.
+Values for other tags are separated by the comma (",") character - escape commas using the "" character.
+Common attributes and values are listed in the IANA IPP registry - see references below.
 <dt><b>ATTR collection </b><i>attribute-name </i><b>{ MEMBER </b><i>tag member-name value(s) ... </i><b>}</b> [ <i>... </i><b>,{ </b><i>... </i><b>} </b>]
-<dd style="margin-left: 5.0em">Adds a collection attribute to the test request. Member attributes follow the same syntax as regular attributes and can themselves be nested collections. Multiple collection values can be supplied as needed, separated by commas.
+<dd style="margin-left: 5.0em">Adds a collection attribute to the test request.
+Member attributes follow the same syntax as regular attributes and can themselves be nested collections.
+Multiple collection values can be supplied as needed, separated by commas.
 <dt><b>COMPRESSION deflate</b>
 <dd style="margin-left: 5.0em"><dt><b>COMPRESSION gzip</b>
 <dd style="margin-left: 5.0em"><dt><b>COMPRESSION none</b>
 <dd style="margin-left: 5.0em">Uses the specified compression on the document data following the attributes in a Print-Job or Send-Document request.
-<dt><b>DELAY </b><i>seconds</i>
-<dd style="margin-left: 5.0em">Specifies a delay before this test will be run.
+<dt><b>DELAY </b><i>seconds</i>[<i>,repeat-seconds</i>]
+<dd style="margin-left: 5.0em">Specifies a delay in seconds before this test will be run.
+If two values are specified, the second value is used as the delay between repeated tests.
 <dt><b>DISPLAY </b><i>attribute-name</i>
 <dd style="margin-left: 5.0em">Specifies that value of the named attribute should be output as part of the
 test report.
@@ -131,6 +163,9 @@ test report.
 <dd style="margin-left: 5.0em"><dt><b>EXPECT ?</b><i>attribute-name predicate(s)</i>
 <dd style="margin-left: 5.0em"><dt><b>EXPECT !</b><i>attribute-name</i>
 <dd style="margin-left: 5.0em">Specifies that the response must/may/must not include the named attribute. Additional requirements can be added as predicates - see the "EXPECT PREDICATES" section for more information on predicates. Attribute names can specify member attributes by separating the attribute and member names with the forward slash, for example "media-col/media-size/x-dimension".
+<dt><b>EXPECT-ALL </b><i>attribute-name </i>[ <i>predicate(s) </i>]
+<dd style="margin-left: 5.0em"><dt><b>EXPECT-ALL ?</b><i>attribute-name predicate(s)</i>
+<dd style="margin-left: 5.0em">Specifies that the response must/may include the named attribute and that all occurrences of that attribute must match the given predicates.
 <dt><b>FILE filename</b>
 <dd style="margin-left: 5.0em">Specifies a file to include at the end of the request. This is typically used when sending a test print file.
 <dt><b>GROUP tag</b>
@@ -138,7 +173,7 @@ test report.
 <dt><b>IGNORE-ERRORS yes</b>
 <dd style="margin-left: 5.0em"><dt><b>IGNORE-ERRORS no</b>
 <dd style="margin-left: 5.0em">Specifies whether
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 will ignore errors and continue with subsequent tests.
 <dt><b>NAME "</b><i>literal string</i><b>"</b>
 <dd style="margin-left: 5.0em">Specifies the human-readable name of the test.
@@ -151,7 +186,7 @@ will ignore errors and continue with subsequent tests.
 <dd style="margin-left: 5.0em">Specifies the request-id value to use in the request, either an integer or the word "random" to use a randomly generated value (the default).
 <dt><b>RESOURCE </b><i>path</i>
 <dd style="margin-left: 5.0em">Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 program.
 <dt><b>SKIP-IF-DEFINED </b><i>variable-name</i>
 <dd style="margin-left: 5.0em"><dt><b>SKIP-IF-NOT-DEFINED </b><i>variable-name</i>
@@ -159,7 +194,7 @@ program.
 <dt><b>SKIP-PREVIOUS-ERROR yes</b>
 <dd style="margin-left: 5.0em"><dt><b>SKIP-PREVIOUS-ERROR no</b>
 <dd style="margin-left: 5.0em">Specifies whether
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 will skip the current test if the previous test resulted in an error/failure.
 <dt><b>STATUS </b><i>status-code </i>[ <i>predicate</i> ]
 <dd style="margin-left: 5.0em">Specifies an expected response status-code value. Additional requirements can be added as predicates - see the "STATUS PREDICATES" section for more information on predicates.
@@ -247,6 +282,9 @@ Specifies the maximum number of times to repeat if the <b>REPEAT-MATCH</b> or <b
 <dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the boolean value given.
 <dt><b>WITH-VALUE "/</b><i>regular expression</i><b>/"</b>
 <dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
+<dt><b>WITH-VALUE-FROM </b><i>attribute-name</i>
+<dd style="margin-left: 5.0em">Requires that the value(s) of the <b>EXPECT</b> attribute matches the value(s) in the specified attribute.
+For example, "EXPECT job-sheets WITH-VALUE-FROM job-sheets-supported" requires that the "job-sheets" value is listed as a value of the "job-sheets-supported" attribute.
 </dl>
 <h3><a name="STATUS_PREDICATES">Status Predicates</a></h3>
 The following predicates are understood following the <b>STATUS</b> test directive:
@@ -267,8 +305,8 @@ Specifies the maximum number of times to repeat. The default value is 1000.
 <dd style="margin-left: 5.0em">Specifies that the current test should be repeated when the response status-code matches or does not match the value specified by the STATUS directive.
 </dl>
 <h3><a name="OPERATION_CODES">Operation Codes</a></h3>
-Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 2911 and other IPP extension specifications. Here is a complete list of names supported by
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8):</a>
+Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of names supported by
+<b>ipptool</b>(8):
 <pre class="man">
 
     Activate-Printer
@@ -340,8 +378,8 @@ Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RF
     Validate-Job
 </pre>
 <h3><a name="STATUS_CODES">Status Codes</a></h3>
-Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 2911 and other IPP extension specifications. Here is a complete list of the names supported by
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8):</a>
+Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of the names supported by
+<b>ipptool</b>(8):
 <pre class="man">
 
     client-error-account-authorization-failed
@@ -403,7 +441,7 @@ Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 2
     successful-ok-too-many-events
 </pre>
 <h3><a name="TAGS">Tags</a></h3>
-Value and group tags correspond to the names from RFC 2911 and other IPP extension specifications. Here are the group tags:
+Value and group tags correspond to the names from RFC 8011 and other IPP extension specifications. Here are the group tags:
 <pre class="man">
 
     document-attributes-tag
@@ -445,7 +483,7 @@ Value and group tags correspond to the names from RFC 2911 and other IPP extensi
 </pre>
 <h3><a name="VARIABLES">Variables</a></h3>
 The
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 program maintains a list of variables that can be used in any literal string or attribute value by specifying "<i>$variable-name</i>". Aside from variables defined using the <i>-d</i> option or <b>DEFINE</b> directive, the following pre-defined variables are available:
 <dl class="man">
 <dt><b>$$</b>
@@ -454,15 +492,15 @@ program maintains a list of variables that can be used in any literal string or
 <dd style="margin-left: 5.0em">Inserts the value of the named environment variable, or an empty string if the environment variable is not defined.
 <dt><b>$filename</b>
 <dd style="margin-left: 5.0em">Inserts the filename provided to
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 with the <i>-f</i> option.
 <dt><b>$filetype</b>
 <dd style="margin-left: 5.0em">Inserts the MIME media type for the filename provided to
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
+<b>ipptool</b>(8)
 with the <i>-f</i> option.
 <dt><b>$hostname</b>
 <dd style="margin-left: 5.0em">Inserts the hostname from the URI provided to
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
+<b>ipptool</b>(8).
 <dt><b>$job-id</b>
 <dd style="margin-left: 5.0em">Inserts the last "job-id" attribute value returned in a test response or 0 if no "job-id" attribute has been seen.
 <dt><b>$job-uri</b>
@@ -471,31 +509,30 @@ with the <i>-f</i> option.
 <dd style="margin-left: 5.0em">Inserts the last "notify-subscription-id" attribute value returned in a test response or 0 if no "notify-subscription-id" attribute has been seen.
 <dt><b>$port</b>
 <dd style="margin-left: 5.0em">Inserts the port number from the URI provided to
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
+<b>ipptool</b>(8).
 <dt><b>$resource</b>
 <dd style="margin-left: 5.0em">Inserts the resource path from the URI provided to
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
+<b>ipptool</b>(8).
 <dt><b>$scheme</b>
 <dd style="margin-left: 5.0em">Inserts the scheme from the URI provided to
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
+<b>ipptool</b>(8).
 <dt><b>$uri</b>
 <dd style="margin-left: 5.0em">Inserts the URI provided to
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
+<b>ipptool</b>(8).
 <dt><b>$uriuser</b>
 <dd style="margin-left: 5.0em">Inserts the username from the URI provided to
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8),</a>
+<b>ipptool</b>(8),
 if any.
 <dt><b>$user</b>
 <dd style="margin-left: 5.0em">Inserts the current user's login name.
 </dl>
 <h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
-<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(1),</a>
-CUPS Online Help (<a href="http://localhost:631/help)">http://localhost:631/help)</a>,
+<b>ipptool</b>(1),
 IANA IPP Registry (<a href="http://www.iana.org/assignments/ipp-registrations)">http://www.iana.org/assignments/ipp-registrations)</a>,
 PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp)">http://www.pwg.org/ipp)</a>,
-RFC 2911 (<a href="http://tools.ietf.org/html/rfc3911">http://tools.ietf.org/html/rfc3911</a>)
+RFC 8011 (<a href="http://tools.ietf.org/html/rfc8011">http://tools.ietf.org/html/rfc8011</a>)
 <h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright &copy; 2007-2014 by Apple Inc.
+Copyright &copy; 2007-2019 by Apple Inc.
 
 </body>
 </html>