From: msweet Date: Wed, 9 Apr 2014 16:12:27 +0000 (+0000) Subject: The ipptool program now supports EXPECT statements for collection member X-Git-Tag: v2.2b1~667 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b13fa61b6b018f7692507f25308cdc61e187eaa;p=thirdparty%2Fcups.git The ipptool program now supports EXPECT statements for collection member attributes () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11806 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index 50fa52372c..60c0bc912b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -CHANGES.txt - 2.0b1 - 2014-04-08 +CHANGES.txt - 2.0b1 - 2014-04-09 -------------------------------- CHANGES IN CUPS V2.0b1 @@ -11,6 +11,8 @@ CHANGES IN CUPS V2.0b1 - Dropped support for AIX, HP-UX, and OSF/1 (aka Digital UNIX) - Dropped lppasswd and support for Digest authentication in in the scheduler (STR #4321) + - The ipptool program now supports EXPECT statements for collection + member attributes () - The ipptool program now supports collection attributes with multiple values () - The sample drivers now include all of the installed localizations by diff --git a/cups/ipp-support.c b/cups/ipp-support.c index 7ef5819fd3..37c17d4832 100644 --- a/cups/ipp-support.c +++ b/cups/ipp-support.c @@ -74,7 +74,11 @@ static const char * const ipp_status_oks[] = /* "OK" status codes */ "client-error-document-password-error", "client-error-document-permission-error", "client-error-document-security-error", - "client-error-document-unprintable-error" + "client-error-document-unprintable-error", + "client-error-account-info-needed", + "client-error-account-closed", + "client-error-account-limit-reached", + "client-error-account-authorization-failed" }, * const ipp_status_480s[] = /* Vendor client errors */ { @@ -1935,7 +1939,7 @@ ippErrorString(ipp_status_t error) /* I - Error status */ else if (error == IPP_STATUS_CUPS_SEE_OTHER) return ("cups-see-other"); else if (error >= IPP_STATUS_ERROR_BAD_REQUEST && - error <= IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE) + error <= IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED) return (ipp_status_400s[error - IPP_STATUS_ERROR_BAD_REQUEST]); else if (error >= 0x480 && error <= IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED) diff --git a/cups/ipp.h b/cups/ipp.h index 38e7c4b55a..6b3964e5fe 100644 --- a/cups/ipp.h +++ b/cups/ipp.h @@ -517,15 +517,21 @@ typedef enum ipp_status_e /**** IPP status codes ****/ IPP_STATUS_ERROR_DOCUMENT_PERMISSION, /* client-error-document-permission-error */ IPP_STATUS_ERROR_DOCUMENT_SECURITY, /* client-error-document-security-error */ IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE,/* client-error-document-unprintable-error */ - - /* Proposed extensions for paid printing */ + IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED, /* client-error-account-info-needed */ + IPP_STATUS_ERROR_ACCOUNT_CLOSED, /* client-error-account-closed */ + IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED, + /* client-error-account-limit-reached */ + IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED, + /* client-error-account-authorization-failed */ + + /* Legacy status codes for paid printing */ IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED = 0x049C, - /* cups-error-account-info-needed @since CUPS 1.7/OS X 10.9@ */ - IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED, /* cups-error-account-closed @since CUPS 1.7/OS X 10.9@ */ + /* cups-error-account-info-needed @deprecated@ */ + IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED, /* cups-error-account-closed @deprecate@ */ IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED, - /* cups-error-account-limit-reached @since CUPS 1.7/OS X 10.9@ */ + /* cups-error-account-limit-reached @deprecated@ */ IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED, - /* cups-error-account-authorization-failed @since CUPS 1.7/OS X 10.9@ */ + /* cups-error-account-authorization-failed @deprecated@ */ IPP_STATUS_ERROR_INTERNAL = 0x0500, /* server-error-internal-error */ IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED, diff --git a/doc/help/man-ipptool.html b/doc/help/man-ipptool.html index 1d9f1c303c..d3d351dc23 100644 --- a/doc/help/man-ipptool.html +++ b/doc/help/man-ipptool.html @@ -11,77 +11,174 @@ ipptool - perform internet printing protocol requests

Synopsis

ipptool -[ --help ] [ --stop-after-include-error ] [ --version ] -[ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -S ] [ -T +[ +--help +] [ +--stop-after-include-error +] [ +--version +] [ +-4 +] [ +-6 +] [ +-C +] [ +-E +] [ +-I +] [ +-L +] [ +-S +] [ +-T seconds -] [ -V +] [ +-V version -] [ -X ] [ -c ] [ -d +] [ +-X +] [ +-c +] [ +-d name=value -] [ -f +] [ +-f filename -] [ -i +] [ +-i seconds -] [ -n +] [ +-n repeat-count -] [ -q ] [ -t ] [ -v ] -URI -filename -[ -...filenameN +] [ +-q +] [ +-t +] [ +-v] +printer-uri +testfile +[ ... +testfile ]

Description

-ipptool sends IPP requests to the specified URI and tests and/or displays the results. Each named file defines one or more requests, including the expected response status, attributes, and values. Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed. The file format is described in ipptoolfile(5). +ipptool +sends IPP requests to the specified +printer-uri +and tests and/or displays the results. Each named +testfile +defines one or more requests, including the expected response status, attributes, and values. Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed. The +testfile +format is described in +ipptoolfile(5).

Options

-The following options are recognized by ipptool: +The following options are recognized by +ipptool:
-
--help +
--help
Shows program help. -
--stop-after-include-error -
Tells ipptool to stop if an error occurs in an included file. Normally ipptool will continue with subsequent tests after the INCLUDE directive. -
--version -
Shows the version of ipptool being used. -
-4 -
Specifies that ipptool must connect to the printer or server using IPv4. -
-6 -
Specifies that ipptool must connect to the printer or server using IPv6. -
-C +
--stop-after-include-error +
Tells +ipptool +to stop if an error occurs in an included file. Normally +ipptool +will continue with subsequent tests after the INCLUDE directive. +
--version +
Shows the version of +ipptool +being used. +
-4 +
Specifies that +ipptool +must connect to the printer or server using IPv4. +
-6 +
Specifies that +ipptool +must connect to the printer or server using IPv6. +
-C
Specifies that requests should be sent using the HTTP/1.1 "Transfer-Encoding: chunked" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. -
-E +
-E
Forces TLS encryption when connecting to the server using the HTTP "Upgrade" header. -
-I -
Specifies that ipptool will continue past errors. -
-L +
-I +
Specifies that +ipptool +will continue past errors. +
-L
Specifies that requests should be sent using the HTTP/1.0 "Content-Length:" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. -
-S -
Forces (dedicated) SSL encryption when connecting to the server. -
-T seconds +
-S +
Forces (dedicated) TLS encryption when connecting to the server. +
-T seconds
Specifies a timeout for IPP requests in seconds. -
-V version +
-V version
Specifies the default IPP version to use: 1.0, 1.1, 2.0, 2.1, or 2.2. If not specified, version 1.1 is used. -
-X -
Specifies that XML (Apple plist) output is desired instead of the plain text report. This option is incompatible with the -i (interval) and -n (repeat-count) options. -
-c +
-X +
Specifies that XML (Apple plist) output is desired instead of the plain text report. This option is incompatible with the -i (interval) and -n (repeat-count) options. +
-c
Specifies that CSV (comma-separated values) output is desired instead of the plain text output. -
-d name=value +
-d name=value
Defines the named variable. -
-f filename +
-f filename
Defines the default request filename for tests. -
-i seconds -
Specifies that the (last) file should be repeated at the specified interval. This option is incompatible with the -X (XML plist output) option. -
-l +
-i seconds +
Specifies that the (last) +testfile +should be repeated at the specified interval. This option is incompatible with the -X (XML plist output) option. +
-l
Specifies that plain text output is desired. -
-n repeat-count -
Specifies that the (last) file should be repeated the specified number of times. This option is incompatible with the -X (XML plist output) option. -
-t +
-n repeat-count +
Specifies that the (last) +testfile +should be repeated the specified number of times. This option is incompatible with the -X (XML plist output) option. +
-t
Specifies that CUPS test report output is desired instead of the plain text output. -
-v -
Specifies that all request and response attributes should be output in CUPS test mode (-t). This is the default for XML output. +
-v +
Specifies that all request and response attributes should be output in CUPS test mode (-t). This is the default for XML output.
-

Exit Code

-The ipptool program returns 0 if all tests were sucessful and 1 otherwise. -

Compatibility

-The ipptool program is unique to CUPS. +

Exit Status

+The +ipptool +program returns 0 if all tests were sucessful and 1 otherwise. +

Files

+The following standard files are available: +
+color.jpg
+create-printer-subscription.test
+document-a4.pdf
+document-a4.ps
+document-letter.pdf
+document-letter.ps
+get-completed-jobs.test
+get-jobs.test
+get-notifications.test
+get-printer-attributes.test
+get-subscriptions.test
+gray.jpg
+ipp-1.1.test
+ipp-2.0.test
+ipp-2.1.test
+ipp-2.2.test
+ipp-everywhere.test
+onepage-a4.pdf
+onepage-a4.ps
+onepage-letter.pdf
+onepage-letter.ps
+print-job.test
+print-job-deflate.test
+print-job-gzip.test
+testfile.jpg
+testfile.pcl
+testfile.pdf
+testfile.ps
+testfile.txt
+validate-job.test
+
+

Conforming To

+The +ipptool +program is unique to CUPS and conforms to the Internet Printing Protocol up to version 2.2.

Examples

Get a list of completed jobs for "myprinter":
@@ -94,51 +191,14 @@ Get a list of completed jobs for "myprinter":
     ipptool -d recipient=mailto:user@example.com \
         ipp://localhost/printers/myprinter create-printer-subscription.test
 
-

Standard Files

-The following standard files are available: -
-
-    color.jpg
-    create-printer-subscription.test
-    document-a4.pdf
-    document-a4.ps
-    document-letter.pdf
-    document-letter.ps
-    get-completed-jobs.test
-    get-jobs.test
-    get-notifications.test
-    get-printer-attributes.test
-    get-subscriptions.test
-    gray.jpg
-    ipp-1.1.test
-    ipp-2.0.test
-    ipp-2.1.test
-    ipp-2.2.test
-    ipp-everywhere.test
-    onepage-a4.pdf
-    onepage-a4.ps
-    onepage-letter.pdf
-    onepage-letter.ps
-    print-job.test
-    print-job-deflate.test
-    print-job-gzip.test
-    testfile.jpg
-    testfile.pcl
-    testfile.pdf
-    testfile.ps
-    testfile.txt
-    validate-job.test
-

See Also

-ipptoolfile(5), RFC 2911, -
-http://localhost:631/help -
-http://www.iana.org/assignments/ipp-registrations -
-http://www.pwg.org/ipp +ipptoolfile(5), +CUPS Online Help (http://localhost:631/help), +IANA IPP Registry (http://www.iana.org/assignments/ipp\-registrations), +PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp) +RFC 2911 (http://tools.ietf.org/html/rfc2911),

Copyright

-Copyright 2007-2014 by Apple Inc. +Copyright © 2007-2014 by Apple Inc. diff --git a/doc/help/man-ipptoolfile.html b/doc/help/man-ipptoolfile.html index 758b14bbff..882c129671 100644 --- a/doc/help/man-ipptoolfile.html +++ b/doc/help/man-ipptoolfile.html @@ -9,15 +9,16 @@

ipptoolfile(5)

Name

ipptoolfile - ipptool file format -

Description

-The ipptool(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: +The +ipptool(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:
 
     # This is a comment
     {
       # The name of the test
-      NAME "Print PostScript Job"
+      NAME "Print PostScript File"
 
       # The request to send
       OPERATION Print-Job
@@ -30,9 +31,7 @@ The ipptool(1) program accepts free-form plain text files that describe o
 
       # The response to expect
       STATUS successful-ok
-      EXPECT attributes-charset OF-TYPE charset
-      EXPECT attributes-natural-language OF-TYPE naturalLanguage
-      EXPECT job-id OF-TYPE integer
+      EXPECT job-id OF-TYPE integer WITH-VALUE >0
       EXPECT job-uri OF-TYPE uri
     }
     {
@@ -50,254 +49,226 @@ The ipptool(1) program accepts free-form plain text files that describe o
 
       # The response to expect
       STATUS successful-ok
-      EXPECT attributes-charset OF-TYPE charset
-      EXPECT attributes-natural-language OF-TYPE naturalLanguage
-      EXPECT job-id OF-TYPE integer
+      EXPECT job-id OF-TYPE integer WITH-VALUE $job-id
       EXPECT job-uri OF-TYPE uri
-      EXPECT job-state OF-TYPE enum
+      EXPECT job-state OF-TYPE enum WITH-VALUE 3,4,5,6,7,8,9
       EXPECT job-originating-user-name OF-TYPE name WITH-VALUE "$user"
     }
 
- -

Top-level Directives

-The following directives can be used outside of a test: +

Top-level Directives

+The following directives can be used outside of a test:
-
{ test } +
{ test }
Defines a test. -
DEFINE variable-name value -
Defines the named variable to the given value. This is equivalent to specifying -"-d variable-name=value" on the ipptool command-line. -
DEFINE-DEFAULT variable-name value -
Defines the named variable to the given value if it does not already have a -value. -
FILE-ID "identifier" +
DEFINE variable-name value +
Defines the named variable to the given value. This is equivalent to specifying -d variable-name=value on the +ipptool(8) +command-line. +
DEFINE-DEFAULT variable-name value +
Defines the named variable to the given value if it does not already have a value. +
FILE-ID "identifier"
Specifies an identifier string for the current file. -
IGNORE-ERRORS yes -
IGNORE-ERRORS no -
Specifies whether, by default, ipptool will ignore errors and continue with -subsequent tests. -
INCLUDE "filename" -
INCLUDE <filename> -
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 ipptool +
IGNORE-ERRORS yes +
IGNORE-ERRORS no +
Specifies whether, by default, +ipptool(8) +will ignore errors and continue with subsequent tests. +
INCLUDE "filename" +
INCLUDE <filename> +
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 +ipptool(8) +include directory. +
INCLUDE-IF-DEFINED name "filename" +
INCLUDE-IF-DEFINED name <filename> +
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 +ipptool(8) include directory. -
INCLUDE-IF-DEFINED name "filename" -
INCLUDE-IF-DEFINED name <filename> -
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 ipptool include directory. -
INCLUDE-IF-NOT-DEFINED name "filename" -
INCLUDE-IF-NOT-DEFINED name <filename> -
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 ipptool include directory. -
SKIP-IF-DEFINED variable-name -
SKIP-IF-NOT-DEFINED variable-name -
Specifies that the remainder of the test file should be skipped when the -variable is or is not defined. -
STOP-AFTER-INCLUDE-ERROR no -
STOP-AFTER-INCLUDE-ERROR yes +
INCLUDE-IF-NOT-DEFINED name "filename" +
INCLUDE-IF-NOT-DEFINED name <filename> +
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 +ipptool(8) +include directory. +
SKIP-IF-DEFINED variable-name +
SKIP-IF-NOT-DEFINED variable-name +
Specifies that the remainder of the test file should be skipped when the variable is or is not defined. +
STOP-AFTER-INCLUDE-ERROR no +
STOP-AFTER-INCLUDE-ERROR yes
Specifies whether tests will be stopped after an error in an included file. -
TRANSFER auto -
Specifies that tests will, by default, use "Transfer-Encoding: chunked" for -requests with attached files and "Content-Length:" for requests without attached -files. -
TRANSFER chunked -
Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: -chunked" header. This is the default and is equivalent to specifying "-c" on the -ipptool command-line. Support for chunked requests is required for -conformance with all versions of IPP. -
TRANSFER length -
Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" -header. This is equivalent to specifying "-l" on the ipptool command-line. -Support for content length requests is required for conformance with all -versions of IPP. -
VERSION 1.0 -
VERSION 1.1 -
VERSION 2.0 -
VERSION 2.1 -
VERSION 2.2 +
TRANSFER auto +
Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. +
TRANSFER chunked +
Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: chunked" header. This is the default and is equivalent to specifying -c on the +ipptool(8) +command-line. Support for chunked requests is required for conformance with all versions of IPP. +
TRANSFER length +
Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" header. This is equivalent to specifying -l on the +ipptool(8) +command-line. Support for content length requests is required for conformance with all versions of IPP. +
VERSION 1.0 +
VERSION 1.1 +
VERSION 2.0 +
VERSION 2.1 +
VERSION 2.2
Specifies the default IPP version number to use for the tests that follow. -
-

Test Directives

-The following directives are understood in a test: +

Test Directives

+The following directives are understood within a test:
-
ATTR tag attribute-name value(s) -
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. -
ATTR collection attribute-name { MEMBER tag member-name value(s) ... } [ ... { ... } ] -
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. -
COMPRESSION deflate -
COMPRESSION gzip -
COMPRESSION none -

-Uses the specified compression on the document data following the attributes in -a Print-Job or Send-Document request. -
DELAY seconds +
ATTR tag attribute-name value(s) +
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. +
ATTR collection attribute-name { MEMBER tag member-name value(s) ... } [ ... ,{ ... } ] +
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. +
COMPRESSION deflate +
COMPRESSION gzip +
COMPRESSION none +
Uses the specified compression on the document data following the attributes in a Print-Job or Send-Document request. +
DELAY seconds
Specifies a delay before this test will be run. -
DISPLAY attribute-name +
DISPLAY attribute-name
Specifies that value of the named attribute should be output as part of the test report. -
EXPECT attribute-name [ predicate(s) ] -
EXPECT ?attribute-name predicate(s) -
EXPECT !attribute-name -
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. -
FILE filename -
Specifies a file to include at the end of the request. This is typically used -when sending a test print file. -
GROUP tag +
EXPECT attribute-name [ predicate(s) ] +
EXPECT ?attribute-name predicate(s) +
EXPECT !attribute-name +
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". +
FILE filename +
Specifies a file to include at the end of the request. This is typically used when sending a test print file. +
GROUP tag
Specifies the group tag for subsequent attributes in the request. -
IGNORE-ERRORS yes -
IGNORE-ERRORS no -
Specifies whether ipptool will ignore errors and continue with subsequent -tests. -
NAME "literal string" +
IGNORE-ERRORS yes +
IGNORE-ERRORS no +
Specifies whether +ipptool(8) +will ignore errors and continue with subsequent tests. +
NAME "literal string"
Specifies the human-readable name of the test. -
OPERATION operation-code +
OPERATION operation-code
Specifies the operation to be performed. -
REQUEST-ID number -
REQUEST-ID random -
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). -
RESOURCE path -
Specifies an alternate resource path that is used for the HTTP POST request. -The default is the resource from the URI provided to the ipptool program. -
SKIP-IF-DEFINED variable-name -
SKIP-IF-NOT-DEFINED variable-name -
Specifies that the current test should be skipped when the variable is or is not -defined. -
SKIP-PREVIOUS-ERROR yes -
SKIP-PREVIOUS-ERROR no -
Specifies whether ipptool will skip the current test if the previous test -resulted in an error/failure. -
STATUS status-code [ predicate ] -
Specifies an expected response status-code value. Additional requirements can be -added as predicates - see the "STATUS PREDICATES" section for more information -on predicates. -
TEST-ID "identifier" +
REQUEST-ID number +
REQUEST-ID random +
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). +
RESOURCE path +
Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the +ipptool(8) +program. +
SKIP-IF-DEFINED variable-name +
SKIP-IF-NOT-DEFINED variable-name +
Specifies that the current test should be skipped when the variable is or is not defined. +
SKIP-PREVIOUS-ERROR yes +
SKIP-PREVIOUS-ERROR no +
Specifies whether +ipptool(8) +will skip the current test if the previous test resulted in an error/failure. +
STATUS status-code [ predicate ] +
Specifies an expected response status-code value. Additional requirements can be added as predicates - see the "STATUS PREDICATES" section for more information on predicates. +
TEST-ID "identifier"
Specifies an identifier string for the current test. -
TRANSFER auto -
Specifies that this test will use "Transfer-Encoding: chunked" if it has an -attached file or "Content-Length:" otherwise. -
TRANSFER chunked -
Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" -header. -
TRANSFER length +
TRANSFER auto +
Specifies that this test will use "Transfer-Encoding: chunked" if it has an attached file or "Content-Length:" otherwise. +
TRANSFER chunked +
Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" header. +
TRANSFER length
Specifies that this test will use the HTTP/1.0 "Content-Length:" header. -
VERSION 1.0 -
VERSION 1.1 -
VERSION 2.0 -
VERSION 2.1 -
VERSION 2.2 +
VERSION 1.0 +
VERSION 1.1 +
VERSION 2.0 +
VERSION 2.1 +
VERSION 2.2
Specifies the IPP version number to use for this test. -
-

Expect Predicates

-The following predicates are understood following the EXPECT test directive: +

Expect Predicates

+The following predicates are understood following the EXPECT test directive:
-
COUNT number -
Requires the EXPECT attribute to have the specified number of values. -
DEFINE-MATCH variable-name -
Defines the variable to "1" when the EXPECT condition matches. A side-effect of -this predicate is that this EXPECT will never fail a test. -
DEFINE-NO-MATCH variable-name -
Defines the variable to "1" when the EXPECT condition does not match. A side- -effect of this predicate is that this EXPECT will never fail a test. -
DEFINE-VALUE variable-name -
Defines the variable to the value of the attribute when the EXPECT condition -matches. A side-effect of this predicate is that this EXPECT will never fail a test. -
IF-DEFINED variable-name -
Makes the EXPECT conditions apply only if the specified variable is defined. -
IF-NOT-DEFINED variable-name -
Makes the EXPECT conditions apply only if the specified variable is not -defined. -
IN-GROUP tag -
Requires the EXPECT attribute to be in the specified group tag. -
OF-TYPE tag[,tag,...] -
Requires the EXPECT attribute to use the specified value tag(s). -
REPEAT-LIMIT number +
COUNT number +
Requires the EXPECT attribute to have the specified number of values. +
DEFINE-MATCH variable-name +
Defines the variable to "1" when the EXPECT condition matches. A side-effect of this predicate is that this EXPECT will never fail a test. +
DEFINE-NO-MATCH variable-name +
Defines the variable to "1" when the EXPECT condition does not match. A side-effect of this predicate is that this EXPECT will never fail a test. +
DEFINE-VALUE variable-name +
Defines the variable to the value of the attribute when the EXPECT condition matches. A side-effect of this predicate is that this EXPECT will never fail a test. +
IF-DEFINED variable-name +
Makes the EXPECT conditions apply only if the specified variable is defined. +
IF-NOT-DEFINED variable-name +
Makes the EXPECT conditions apply only if the specified variable is not defined. +
IN-GROUP tag +
Requires the EXPECT attribute to be in the specified group tag. +
OF-TYPE tag[,tag,...] +
Requires the EXPECT attribute to use one of the specified value tag(s). +
REPEAT-LIMIT number

-Specifies the maximum number of times to repeat. The default value is 1000. -
REPEAT-MATCH -
REPEAT-NO-MATCH -
Specifies that the current test should be repeated when the EXPECT condition -matches or does not match. -
SAME-COUNT-AS attribute-name -
Requires the EXPECT attribute to have the same number of values as the specified -parallel attribute. -
WITH-ALL-HOSTNAMES "literal string" -
WITH-ALL-HOSTNAMES "/regular expression/" +Specifies the maximum number of times to repeat if the REPEAT-MATCH or REPEAT-NO-MATCH predicate is specified. The default value is 1000. +
REPEAT-MATCH +
REPEAT-NO-MATCH +
Specifies that the current test should be repeated when the EXPECT condition matches or does not match. +
SAME-COUNT-AS attribute-name +
Requires the EXPECT attribute to have the same number of values as the specified parallel attribute. +
WITH-ALL-HOSTNAMES "literal string" +
WITH-ALL-HOSTNAMES "/regular expression/"
Requires that all URI values contain a matching hostname. -
WITH-ALL-RESOURCES "literal string" -
WITH-ALL-RESOURCES "/regular expression/" +
WITH-ALL-RESOURCES "literal string" +
WITH-ALL-RESOURCES "/regular expression/"
Requires that all URI values contain a matching resource (including leading /). -
WITH-ALL-SCHEMES "literal string" -
WITH-ALL-SCHEMES "/regular expression/" +
WITH-ALL-SCHEMES "literal string" +
WITH-ALL-SCHEMES "/regular expression/"
Requires that all URI values contain a matching scheme. -
WITH-ALL-VALUES "literal string" -
Requires that all values of the EXPECT attribute match the literal string. Comparisons are case-sensitive. -
WITH-ALL-VALUES <number -
WITH-ALL-VALUES =number -
WITH-ALL-VALUES >number -
WITH-ALL-VALUES number[,number,...] -
Requires that all values of the EXPECT attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range. -
WITH-ALL-VALUES "false" -
WITH-ALL-VALUES "true" -
Requires that all values of the EXPECT attribute match the boolean value given. -
WITH-ALL-VALUES "/regular expression/" -
Requires that all values of the EXPECT attribute match the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive. -
WITH-HOSTNAME "literal string" -
WITH-HOSTNAME "/regular expression/" +
WITH-ALL-VALUES "literal string" +
Requires that all values of the EXPECT attribute match the literal string. Comparisons are case-sensitive. +
WITH-ALL-VALUES <number +
WITH-ALL-VALUES =number +
WITH-ALL-VALUES >number +
WITH-ALL-VALUES number[,...,number] +
Requires that all values of the EXPECT attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range. +
WITH-ALL-VALUES "false" +
WITH-ALL-VALUES "true" +
Requires that all values of the EXPECT attribute match the boolean value given. +
WITH-ALL-VALUES "/regular expression/" +
Requires that all values of the EXPECT attribute match the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive. +
WITH-HOSTNAME "literal string" +
WITH-HOSTNAME "/regular expression/"
Requires that at least one URI value contains a matching hostname. -
WITH-RESOURCE "literal string" -
WITH-RESOURCE "/regular expression/" +
WITH-RESOURCE "literal string" +
WITH-RESOURCE "/regular expression/"
Requires that at least one URI value contains a matching resource (including leading /). -
WITH-SCHEME "literal string" -
WITH-SCHEME "/regular expression/" +
WITH-SCHEME "literal string" +
WITH-SCHEME "/regular expression/"
Requires that at least one URI value contains a matching scheme. -
WITH-VALUE "literal string" -
Requires that at least one value of the EXPECT attribute matches the literal string. Comparisons are case-sensitive. -
WITH-VALUE <number -
WITH-VALUE =number -
WITH-VALUE >number -
WITH-VALUE number[,number,...] -
Requires that at least one value of the EXPECT attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range. -
WITH-VALUE "false" -
WITH-VALUE "true" -
Requires that at least one value of the EXPECT attribute matches the boolean value given. -
WITH-VALUE "/regular expression/" -
Requires that at least one value of the EXPECT attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive. - +
WITH-VALUE "literal string" +
Requires that at least one value of the EXPECT attribute matches the literal string. Comparisons are case-sensitive. +
WITH-VALUE <number +
WITH-VALUE =number +
WITH-VALUE >number +
WITH-VALUE number[,...,number] +
Requires that at least one value of the EXPECT attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range. +
WITH-VALUE "false" +
WITH-VALUE "true" +
Requires that at least one value of the EXPECT attribute matches the boolean value given. +
WITH-VALUE "/regular expression/" +
Requires that at least one value of the EXPECT attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
-

Status Predicates

-The following predicates are understood following the STATUS test directive: +

Status Predicates

+The following predicates are understood following the STATUS test directive:
-
DEFINE-MATCH variable-name -
Defines the variable to "1" when the STATUS matches. A side-effect of this predicate is that this STATUS will never fail a test. -
DEFINE-NO-MATCH variable-name -
Defines the variable to "1" when the STATUS does not match. A side-effect of this predicate is that this STATUS will never fail a test. -
IF-DEFINED variable-name -
Makes the STATUS apply only if the specified variable is defined. -
IF-NOT-DEFINED variable-name -
Makes the STATUS apply only if the specified variable is not defined. -
REPEAT-LIMIT number +
DEFINE-MATCH variable-name +
Defines the variable to "1" when the STATUS matches. A side-effect of this predicate is that this STATUS will never fail a test. +
DEFINE-NO-MATCH variable-name +
Defines the variable to "1" when the STATUS does not match. A side-effect of this predicate is that this STATUS will never fail a test. +
IF-DEFINED variable-name +
Makes the STATUS apply only if the specified variable is defined. +
IF-NOT-DEFINED variable-name +
Makes the STATUS apply only if the specified variable is not defined. +
REPEAT-LIMIT number

Specifies the maximum number of times to repeat. The default value is 1000. -
REPEAT-MATCH -
REPEAT-NO-MATCH -
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. - +
REPEAT-MATCH +
REPEAT-NO-MATCH +
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.
-

Operation Codes

-Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from -RFC 2911 and other IPP extension specifications. Here is a complete list: +

Operation Codes

+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 +ipptool(8):
+
     Activate-Printer
     CUPS-Accept-Jobs
     CUPS-Add-Modify-Class
@@ -366,11 +337,15 @@ RFC 2911 and other IPP extension specifications. Here is a complete list:
     Validate-Document
     Validate-Job
 
- -

Status Codes

-Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC -2911 and other IPP extension specifications. Here is a complete list: +

Status Codes

+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 +ipptool(8):
+
+    client-error-account-authorization-failed
+    client-error-account-closed
+    client-error-account-info-needed
+    client-error-account-limit-reached
     client-error-attributes-not-settable
     client-error-attributes-or-values-not-supported
     client-error-bad-request
@@ -399,6 +374,10 @@ Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC
     client-error-timeout
     client-error-too-many-subscriptions
     client-error-uri-scheme-not-supported
+    cups-error-account-authorization-failed
+    cups-error-account-closed
+    cups-error-account-info-needed
+    cups-error-account-limit-reached
     cups-see-other
     redirection-other-site
     server-error-busy
@@ -421,11 +400,11 @@ Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC
     successful-ok-ignored-subscriptions
     successful-ok-too-many-events
 
- -

Tags

-Value and group tags correspond to the names from RFC 2911 and other IPP -extension specifications. Here are the group tags: +

Tags

+Value and group tags correspond to the names from RFC 2911 and other IPP extension specifications. Here are the group tags:
+
+    document-attributes-tag
     event-notification-attributes-tag
     job-attributes-tag
     operation-attributes-tag
@@ -435,6 +414,7 @@ extension specifications. Here are the group tags:
 

Here are the value tags:

+
     admin-define
     boolean
     charset
@@ -461,55 +441,59 @@ extension specifications. Here are the group tags:
     uri
     uriScheme
 
- -

Variables

-The ipptool program maintains a list of variables that can be used in any -literal string or attribute value by specifying "$variable-name". Aside from -variables defined using the "-d" option or "DEFINE" directive, the following -pre-defined variables are available: +

Variables

+The +ipptool(8) +program maintains a list of variables that can be used in any literal string or attribute value by specifying "$variable-name". Aside from variables defined using the -d option or DEFINE directive, the following pre-defined variables are available:
-
$$ +
$$
Inserts a single "$" character. -
$ENV[name] -
Inserts the value of the named environment variable, or an empty string if the -environment variable is not defined. -
$filename -
Inserts the filename provided to ipptool with the "-f" option. -
$hostname -
Inserts the hostname from the URI provided to ipptool. -
$job-id -
Inserts the last job-id value returned in a test response or 0 if no job-id has -been seen. -
$job-uri -
Inserts the last job-uri value returned in a test response or an empty string if -no job-uri has been seen. -
$scheme -
Inserts the scheme from the URI provided to ipptool. -
$notify-subscription-id -
Inserts the last notify-subscription-id value returned in a test response or 0 if -no notify-subscription-id has been seen. -
$port -
Inserts the port number from the URI provided to ipptool. -
$resource -
Inserts the resource path from the URI provided to ipptool. -
$uri -
Inserts the URI provided to ipptool. -
$user +
$ENV[name] +
Inserts the value of the named environment variable, or an empty string if the environment variable is not defined. +
$filename +
Inserts the filename provided to +ipptool(8) +with the -f option. +
$filetype +
Inserts the MIME media type for the filename provided to +ipptool(8) +with the -f option. +
$hostname +
Inserts the hostname from the URI provided to +ipptool(8). +
$job-id +
Inserts the last "job-id" attribute value returned in a test response or 0 if no "job-id" attribute has been seen. +
$job-uri +
Inserts the last "job-uri" attribute value returned in a test response or an empty string if no "job-uri" attribute has been seen. +
$notify-subscription-id +
Inserts the last "notify-subscription-id" attribute value returned in a test response or 0 if no "notify-subscription-id" attribute has been seen. +
$port +
Inserts the port number from the URI provided to +ipptool(8). +
$resource +
Inserts the resource path from the URI provided to +ipptool(8). +
$scheme +
Inserts the scheme from the URI provided to +ipptool(8). +
$uri +
Inserts the URI provided to +ipptool(8). +
$uriuser +
Inserts the username from the URI provided to +ipptool(8), +if any. +
$user
Inserts the current user's login name. -
$username -
Inserts the username from the URI provided to ipptool, if any. -

See Also

-ipptool(1), RFC 2911, -
-http://localhost:631/help -
-http://www.iana.org/assignments/ipp-registrations -
-http://www.pwg.org/ipp +ipptool(1), +CUPS Online Help (http://localhost:631/help), +IANA IPP Registry (http://www.iana.org/assignments/ipp-registrations), +PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp), +RFC 2911 (http://tools.ietf.org/html/rfc3911)

Copyright

-Copyright 2007-2014 by Apple Inc. +Copyright © 2007-2014 by Apple Inc. diff --git a/man/ipptool.man b/man/ipptool.man index 031edcefed..bcd276f084 100644 --- a/man/ipptool.man +++ b/man/ipptool.man @@ -11,159 +11,219 @@ .\" which should have been included with this file. If this file is .\" file is missing or damaged, see the license at "http://www.cups.org/". .\" -.TH ipptool 1 "CUPS" "20 February 2014" "Apple Inc." +.TH ipptool 1 "CUPS" "9 April 2014" "Apple Inc." .SH NAME -ipptool - perform internet printing protocol requests +ipptool \- perform internet printing protocol requests .SH SYNOPSIS .B ipptool -[ --help ] [ --stop-after-include-error ] [ --version ] -[ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -S ] [ -T +[ +.B \-\-help +] [ +.B \-\-stop\-after\-include\-error +] [ +.B \-\-version +] [ +.B \-4 +] [ +.B \-6 +] [ +.B \-C +] [ +.B \-E +] [ +.B \-I +] [ +.B \-L +] [ +.B \-S +] [ +.B \-T .I seconds -] [ -V +] [ +.B \-V .I version -] [ -X ] [ -c ] [ -d +] [ +.B \-X +] [ +.B \-c +] [ +.B \-d .I name=value -] [ -f +] [ +.B \-f .I filename -] [ -i +] [ +.B \-i .I seconds -] [ -n +] [ +.B \-n .I repeat-count -] [ -q ] [ -t ] [ -v ] -.I URI -.I filename -[ -.I ... filenameN +] [ +.B \-q +] [ +.B \-t +] [ +.B \-v ] +.I printer-uri +.I testfile +[ ... +.I testfile ] .SH DESCRIPTION -\fIipptool\fR sends IPP requests to the specified URI and tests and/or displays the results. Each named file defines one or more requests, including the expected response status, attributes, and values. Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed. The file format is described in \fIipptoolfile(5)\fR. +.B ipptool +sends IPP requests to the specified +.I printer-uri +and tests and/or displays the results. Each named +.I testfile +defines one or more requests, including the expected response status, attributes, and values. Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed. The +.I testfile +format is described in +.BR ipptoolfile (5). .SH OPTIONS -The following options are recognized by \fIipptool\fR: +The following options are recognized by +.B ipptool: .TP 5 ---help +.B \-\-help Shows program help. .TP 5 ---stop-after-include-error -Tells \fIipptool\fR to stop if an error occurs in an included file. Normally \fIipptool\fR will continue with subsequent tests after the INCLUDE directive. +.B \-\-stop-after-include-error +Tells +.B ipptool +to stop if an error occurs in an included file. Normally +.B ipptool +will continue with subsequent tests after the INCLUDE directive. .TP 5 ---version -Shows the version of \fIipptool\fR being used. +.B \-\-version +Shows the version of +.B ipptool +being used. .TP 5 --4 -Specifies that \fIipptool\fR must connect to the printer or server using IPv4. +.B \-4 +Specifies that +.B ipptool +must connect to the printer or server using IPv4. .TP 5 --6 -Specifies that \fIipptool\fR must connect to the printer or server using IPv6. +.B \-6 +Specifies that +.B ipptool +must connect to the printer or server using IPv6. .TP 5 --C -Specifies that requests should be sent using the HTTP/1.1 "Transfer-Encoding: chunked" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. +.B \-C +Specifies that requests should be sent using the HTTP/1.1 "Transfer\-Encoding: chunked" header, which is required for conformance by all versions of IPP. The default is to use "Transfer\-Encoding: chunked" for requests with attached files and "Content\-Length:" for requests without attached files. .TP 5 --E +.B \-E Forces TLS encryption when connecting to the server using the HTTP "Upgrade" header. .TP 5 --I -Specifies that \fIipptool\fR will continue past errors. +.B \-I +Specifies that +.B ipptool +will continue past errors. .TP 5 --L -Specifies that requests should be sent using the HTTP/1.0 "Content-Length:" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. +.B \-L +Specifies that requests should be sent using the HTTP/1.0 "Content\-Length:" header, which is required for conformance by all versions of IPP. The default is to use "Transfer\-Encoding: chunked" for requests with attached files and "Content\-Length:" for requests without attached files. .TP 5 --S -Forces (dedicated) SSL encryption when connecting to the server. +.B \-S +Forces (dedicated) TLS encryption when connecting to the server. .TP 5 --T seconds +.BI \-T \ seconds Specifies a timeout for IPP requests in seconds. .TP 5 --V version +.BI \-V \ version Specifies the default IPP version to use: 1.0, 1.1, 2.0, 2.1, or 2.2. If not specified, version 1.1 is used. .TP 5 --X -Specifies that XML (Apple plist) output is desired instead of the plain text report. This option is incompatible with the \fI-i\fR (interval) and \fI-n\fR (repeat-count) options. +.B \-X +Specifies that XML (Apple plist) output is desired instead of the plain text report. This option is incompatible with the \fB\-i\fR (interval) and \fB\-n\fR (repeat\-count) options. .TP 5 --c -Specifies that CSV (comma-separated values) output is desired instead of the plain text output. +.B \-c +Specifies that CSV (comma\-separated values) output is desired instead of the plain text output. .TP 5 --d name=value +.BI \-d \ name=value Defines the named variable. .TP 5 --f filename +.BI \-f \ filename Defines the default request filename for tests. .TP 5 --i seconds -Specifies that the (last) file should be repeated at the specified interval. This option is incompatible with the \fI-X\fR (XML plist output) option. +.BI \-i \ seconds +Specifies that the (last) +.I testfile +should be repeated at the specified interval. This option is incompatible with the \fB\-X\fR (XML plist output) option. .TP 5 --l +.B \-l Specifies that plain text output is desired. .TP 5 --n repeat-count -Specifies that the (last) file should be repeated the specified number of times. This option is incompatible with the \fI-X\fR (XML plist output) option. +.BI \-n \ repeat\-count +Specifies that the (last) +.I testfile +should be repeated the specified number of times. This option is incompatible with the \fI\-X\fR (XML plist output) option. .TP 5 --t +.B \-t Specifies that CUPS test report output is desired instead of the plain text output. .TP 5 --v -Specifies that all request and response attributes should be output in CUPS test mode (\fI-t\fR). This is the default for XML output. -.SH EXIT CODE -The \fIipptool\fR program returns 0 if all tests were sucessful and 1 otherwise. -.SH COMPATIBILITY -The \fIipptool\fR program is unique to CUPS. +.B \-v +Specifies that all request and response attributes should be output in CUPS test mode (\fB\-t\fR). This is the default for XML output. +.SH EXIT STATUS +The +.B ipptool +program returns 0 if all tests were sucessful and 1 otherwise. +.SH FILES +The following standard files are available: +.nf +.I color.jpg +.I create\-printer\-subscription.test +.I document\-a4.pdf +.I document\-a4.ps +.I document\-letter.pdf +.I document\-letter.ps +.I get\-completed\-jobs.test +.I get\-jobs.test +.I get\-notifications.test +.I get\-printer\-attributes.test +.I get\-subscriptions.test +.I gray.jpg +.I ipp\-1.1.test +.I ipp\-2.0.test +.I ipp\-2.1.test +.I ipp\-2.2.test +.I ipp\-everywhere.test +.I onepage\-a4.pdf +.I onepage\-a4.ps +.I onepage\-letter.pdf +.I onepage\-letter.ps +.I print\-job.test +.I print\-job\-deflate.test +.I print\-job\-gzip.test +.I testfile.jpg +.I testfile.pcl +.I testfile.pdf +.I testfile.ps +.I testfile.txt +.I validate\-job.test +.fi +.SH CONFORMING TO +The +.B ipptool +program is unique to CUPS and conforms to the Internet Printing Protocol up to version 2.2. .SH EXAMPLES Get a list of completed jobs for "myprinter": .nf - ipptool ipp://localhost/printers/myprinter get-completed-jobs.test + ipptool ipp://localhost/printers/myprinter get\-completed\-jobs.test .fi .LP Send email notifications to "user@example.com" when "myprinter" changes: .nf - ipptool -d recipient=mailto:user@example.com \\ - ipp://localhost/printers/myprinter create-printer-subscription.test -.fi -.SH STANDARD FILES -The following standard files are available: -.nf - - color.jpg - create-printer-subscription.test - document-a4.pdf - document-a4.ps - document-letter.pdf - document-letter.ps - get-completed-jobs.test - get-jobs.test - get-notifications.test - get-printer-attributes.test - get-subscriptions.test - gray.jpg - ipp-1.1.test - ipp-2.0.test - ipp-2.1.test - ipp-2.2.test - ipp-everywhere.test - onepage-a4.pdf - onepage-a4.ps - onepage-letter.pdf - onepage-letter.ps - print-job.test - print-job-deflate.test - print-job-gzip.test - testfile.jpg - testfile.pcl - testfile.pdf - testfile.ps - testfile.txt - validate-job.test + ipptool \-d recipient=mailto:user@example.com \\ + ipp://localhost/printers/myprinter create\-printer\-subscription.test .fi .SH SEE ALSO -\fIipptoolfile(5)\fR, RFC 2911, -.br -http://localhost:631/help -.br -http://www.iana.org/assignments/ipp-registrations -.br -http://www.pwg.org/ipp +.BR ipptoolfile (5), +CUPS Online Help (http://localhost:631/help), +IANA IPP Registry (http://www.iana.org/assignments/ipp\-registrations), +PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp) +RFC 2911 (http://tools.ietf.org/html/rfc2911), .SH COPYRIGHT -Copyright 2007-2014 by Apple Inc. +Copyright \[co] 2007-2014 by Apple Inc. .\" .\" End of "$Id$". .\" diff --git a/man/ipptoolfile.man b/man/ipptoolfile.man index 1c630ffb04..dcef8b49c2 100644 --- a/man/ipptoolfile.man +++ b/man/ipptoolfile.man @@ -11,539 +11,519 @@ .\" which should have been included with this file. If this file is .\" file is missing or damaged, see the license at "http://www.cups.org/". .\" -.TH ipptoolfile 5 "CUPS" "25 March 2014" "Apple Inc." +.TH ipptoolfile 5 "CUPS" "9 April 2014" "Apple Inc." .SH NAME ipptoolfile \- ipptool file format - .SH DESCRIPTION -The \fIipptool(1)\fR 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: +The +.BR ipptool (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: .nf # This is a comment { # The name of the test - NAME "Print PostScript Job" + NAME "Print PostScript 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 + 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 # The response to expect - STATUS successful-ok - EXPECT attributes-charset OF-TYPE charset - EXPECT attributes-natural-language OF-TYPE naturalLanguage - EXPECT job-id OF-TYPE integer - EXPECT job-uri OF-TYPE uri + STATUS successful\-ok + EXPECT job\-id OF\-TYPE integer WITH\-VALUE >0 + EXPECT job\-uri OF\-TYPE uri } { # The name of the test NAME "Get Attributes of PostScript Job" # The request to send - OPERATION Get-Job-Attributes - 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 + OPERATION Get\-Job\-Attributes + 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 # The response to expect - STATUS successful-ok - EXPECT attributes-charset OF-TYPE charset - EXPECT attributes-natural-language OF-TYPE naturalLanguage - EXPECT job-id OF-TYPE integer - EXPECT job-uri OF-TYPE uri - EXPECT job-state OF-TYPE enum - EXPECT job-originating-user-name OF-TYPE name WITH-VALUE "$user" + 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\-originating\-user\-name OF\-TYPE name WITH\-VALUE "$user" } .fi - -.SH TOP-LEVEL DIRECTIVES -The following directives can be used outside of a test: +.SS TOP-LEVEL DIRECTIVES +The following directives can be used outside of a \fItest\fR: .TP 5 -{ test } +\fB{ \fItest \fB}\fR Defines a test. .TP 5 -DEFINE variable-name value -Defines the named variable to the given value. This is equivalent to specifying -"-d variable-name=value" on the \fIipptool\fR command-line. +\fBDEFINE \fIvariable-name value\fR +Defines the named variable to the given value. This is equivalent to specifying \fI\-d variable-name=value\fR on the +.BR ipptool (8) +command-line. .TP 5 -DEFINE-DEFAULT variable-name value -Defines the named variable to the given value if it does not already have a -value. +\fBDEFINE\-DEFAULT \fIvariable-name value\fR +Defines the named variable to the given value if it does not already have a value. .TP 5 -FILE-ID "identifier" +\fBFILE\-ID "\fIidentifier\fB"\fR Specifies an identifier string for the current file. .TP 5 -IGNORE-ERRORS yes +\fBIGNORE\-ERRORS yes\fR .TP 5 -IGNORE-ERRORS no -Specifies whether, by default, \fIipptool\fR will ignore errors and continue with -subsequent tests. +\fBIGNORE\-ERRORS no\fR +Specifies whether, by default, +.BR ipptool (8) +will ignore errors and continue with subsequent tests. .TP 5 -INCLUDE "filename" +\fBINCLUDE "\fIfilename\fB"\fR .TP 5 -INCLUDE -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 \fIipptool\fR +\fBINCLUDE <\fIfilename\fB>\fR +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 +.BR ipptool (8) include directory. .TP 5 -INCLUDE-IF-DEFINED name "filename" +\fBINCLUDE\-IF\-DEFINED \fIname \fB"\fIfilename\fB"\fR .TP 5 -INCLUDE-IF-DEFINED name -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 \fIipptool\fR include directory. +\fBINCLUDE\-IF\-DEFINED \fIname \fB<\fIfilename\fB>\fR +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 +.BR ipptool (8) +include directory. .TP 5 -INCLUDE-IF-NOT-DEFINED name "filename" +\fBINCLUDE\-IF\-NOT\-DEFINED \fIname \fB"\fIfilename\fB"\fR .TP 5 -INCLUDE-IF-NOT-DEFINED name -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 \fIipptool\fR include directory. +\fBINCLUDE\-IF\-NOT\-DEFINED \fIname \fB<\fIfilename\fB>\fR +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 +.BR ipptool (8) +include directory. .TP 5 -SKIP-IF-DEFINED variable-name +\fBSKIP\-IF\-DEFINED \fIvariable-name\fR .TP 5 -SKIP-IF-NOT-DEFINED variable-name -Specifies that the remainder of the test file should be skipped when the -variable is or is not defined. +\fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR +Specifies that the remainder of the test file should be skipped when the variable is or is not defined. .TP 5 -STOP-AFTER-INCLUDE-ERROR no +\fBSTOP\-AFTER\-INCLUDE\-ERROR no\fR .TP 5 -STOP-AFTER-INCLUDE-ERROR yes +\fBSTOP\-AFTER\-INCLUDE\-ERROR yes\fR Specifies whether tests will be stopped after an error in an included file. .TP 5 -TRANSFER auto -Specifies that tests will, by default, use "Transfer-Encoding: chunked" for -requests with attached files and "Content-Length:" for requests without attached -files. +\fBTRANSFER auto\fR +Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. .TP 5 -TRANSFER chunked -Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: -chunked" header. This is the default and is equivalent to specifying "-c" on the -\fIipptool\fR command-line. Support for chunked requests is required for -conformance with all versions of IPP. +\fBTRANSFER chunked\fR +Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: chunked" header. This is the default and is equivalent to specifying \fI\-c\fR on the +.BR ipptool (8) +command-line. Support for chunked requests is required for conformance with all versions of IPP. .TP 5 -TRANSFER length -Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" -header. This is equivalent to specifying "-l" on the \fIipptool\fR command-line. -Support for content length requests is required for conformance with all -versions of IPP. +\fBTRANSFER length\fR +Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" header. This is equivalent to specifying \fI\-l\fR on the +.BR ipptool (8) +command-line. Support for content length requests is required for conformance with all versions of IPP. .TP 5 -VERSION 1.0 +\fBVERSION 1.0\fR .TP 5 -VERSION 1.1 +\fBVERSION 1.1\fR .TP 5 -VERSION 2.0 +\fBVERSION 2.0\fR .TP 5 -VERSION 2.1 +\fBVERSION 2.1\fR .TP 5 -VERSION 2.2 +\fBVERSION 2.2\fR Specifies the default IPP version number to use for the tests that follow. - -.SH TEST DIRECTIVES -The following directives are understood in a test: +.SS TEST DIRECTIVES +The following directives are understood within a \fItest\fR: .TP 5 -ATTR tag attribute-name value(s) -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. +\fBATTR \fItag attribute-name value(s)\fR +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. .TP 5 -ATTR collection attribute-name { MEMBER tag member-name value(s) ... } [ ... { ... } ] -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. +\fBATTR collection \fIattribute-name \fB{ MEMBER \fItag member-name value(s) ... \fB}\fR [ \fI... \fB,{ \fI... \fB} \fR] +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. .TP 5 -COMPRESSION deflate +\fBCOMPRESSION deflate\fR .TP 5 -COMPRESSION gzip +\fBCOMPRESSION gzip\fR .TP 5 -COMPRESSION none -.br -Uses the specified compression on the document data following the attributes in -a Print-Job or Send-Document request. +\fBCOMPRESSION none\fR +Uses the specified compression on the document data following the attributes in a Print-Job or Send-Document request. .TP 5 -DELAY seconds +\fBDELAY \fIseconds\fR Specifies a delay before this test will be run. .TP 5 -DISPLAY attribute-name +\fBDISPLAY \fIattribute-name\fR Specifies that value of the named attribute should be output as part of the test report. .TP 5 -EXPECT attribute-name [ predicate(s) ] +\fBEXPECT \fIattribute-name \fR[ \fIpredicate(s) \fR] .TP 5 -EXPECT ?attribute-name predicate(s) +\fBEXPECT ?\fIattribute-name predicate(s)\fR .TP 5 -EXPECT !attribute-name -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. +\fBEXPECT !\fIattribute-name\fR +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". .TP 5 -FILE filename -Specifies a file to include at the end of the request. This is typically used -when sending a test print file. +\fBFILE filename\fR +Specifies a file to include at the end of the request. This is typically used when sending a test print file. .TP 5 -GROUP tag +\fBGROUP tag\fR Specifies the group tag for subsequent attributes in the request. .TP 5 -IGNORE-ERRORS yes +\fBIGNORE\-ERRORS yes\fR .TP 5 -IGNORE-ERRORS no -Specifies whether \fIipptool\fR will ignore errors and continue with subsequent -tests. +\fBIGNORE\-ERRORS no\fR +Specifies whether +.BR ipptool (8) +will ignore errors and continue with subsequent tests. .TP 5 -NAME "literal string" +\fBNAME "\fIliteral string\fB"\fR Specifies the human-readable name of the test. .TP 5 -OPERATION operation-code +\fBOPERATION \fIoperation-code\fR Specifies the operation to be performed. .TP 5 -REQUEST-ID number +\fBREQUEST\-ID \fInumber\fR\fR .TP 5 -REQUEST-ID random -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). +\fBREQUEST\-ID random\fR +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). .TP 5 -RESOURCE path -Specifies an alternate resource path that is used for the HTTP POST request. -The default is the resource from the URI provided to the \fIipptool\fR program. +\fBRESOURCE \fIpath\fR +Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the +.BR ipptool (8) +program. .TP 5 -SKIP-IF-DEFINED variable-name +\fBSKIP\-IF\-DEFINED \fIvariable-name\fR .TP 5 -SKIP-IF-NOT-DEFINED variable-name -Specifies that the current test should be skipped when the variable is or is not -defined. +\fBSKIP\-IF\-NOT\-DEFINED \fIvariable-name\fR +Specifies that the current test should be skipped when the variable is or is not defined. .TP 5 -SKIP-PREVIOUS-ERROR yes +\fBSKIP\-PREVIOUS\-ERROR yes\fR .TP 5 -SKIP-PREVIOUS-ERROR no -Specifies whether \fIipptool\fR will skip the current test if the previous test -resulted in an error/failure. +\fBSKIP\-PREVIOUS\-ERROR no\fR +Specifies whether +.BR ipptool (8) +will skip the current test if the previous test resulted in an error/failure. .TP 5 -STATUS status-code [ predicate ] -Specifies an expected response status-code value. Additional requirements can be -added as predicates - see the "STATUS PREDICATES" section for more information -on predicates. +\fBSTATUS \fIstatus-code \fR[ \fIpredicate\fR ] +Specifies an expected response status-code value. Additional requirements can be added as predicates - see the "STATUS PREDICATES" section for more information on predicates. .TP 5 -TEST-ID "identifier" +\fBTEST\-ID "\fIidentifier\fR" Specifies an identifier string for the current test. .TP 5 -TRANSFER auto -Specifies that this test will use "Transfer-Encoding: chunked" if it has an -attached file or "Content-Length:" otherwise. +\fBTRANSFER auto\fR +Specifies that this test will use "Transfer-Encoding: chunked" if it has an attached file or "Content-Length:" otherwise. .TP 5 -TRANSFER chunked -Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" -header. +\fBTRANSFER chunked\fR +Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" header. .TP 5 -TRANSFER length +\fBTRANSFER length\fR Specifies that this test will use the HTTP/1.0 "Content-Length:" header. .TP 5 -VERSION 1.0 +\fBVERSION 1.0\fR .TP 5 -VERSION 1.1 +\fBVERSION 1.1\fR .TP 5 -VERSION 2.0 +\fBVERSION 2.0\fR .TP 5 -VERSION 2.1 +\fBVERSION 2.1\fR .TP 5 -VERSION 2.2 +\fBVERSION 2.2\fR Specifies the IPP version number to use for this test. - -.SH EXPECT PREDICATES -The following predicates are understood following the EXPECT test directive: +.SS EXPECT PREDICATES +The following predicates are understood following the \fBEXPECT\fR test directive: .TP 5 -COUNT number -Requires the EXPECT attribute to have the specified number of values. +\fBCOUNT \fInumber\fR +Requires the \fBEXPECT\fR attribute to have the specified number of values. .TP 5 -DEFINE-MATCH variable-name -Defines the variable to "1" when the EXPECT condition matches. A side-effect of -this predicate is that this EXPECT will never fail a test. +\fBDEFINE\-MATCH \fIvariable-name\fR +Defines the variable to "1" when the \fBEXPECT\fR condition matches. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test. .TP 5 -DEFINE-NO-MATCH variable-name -Defines the variable to "1" when the EXPECT condition does not match. A side- -effect of this predicate is that this EXPECT will never fail a test. +\fBDEFINE\-NO\-MATCH \fIvariable-name\fR +Defines the variable to "1" when the \fBEXPECT\fR condition does not match. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test. .TP 5 -DEFINE-VALUE variable-name -Defines the variable to the value of the attribute when the EXPECT condition -matches. A side-effect of this predicate is that this EXPECT will never fail a test. +\fBDEFINE\-VALUE \fIvariable-name\fR +Defines the variable to the value of the attribute when the \fBEXPECT\fR condition matches. A side-effect of this predicate is that this \fBEXPECT\fR will never fail a test. .TP 5 -IF-DEFINED variable-name -Makes the EXPECT conditions apply only if the specified variable is defined. +\fBIF\-DEFINED \fIvariable-name\fR +Makes the \fBEXPECT\fR conditions apply only if the specified variable is defined. .TP 5 -IF-NOT-DEFINED variable-name -Makes the EXPECT conditions apply only if the specified variable is not -defined. +\fBIF\-NOT\-DEFINED \fIvariable-name\fR +Makes the \fBEXPECT\fR conditions apply only if the specified variable is not defined. .TP 5 -IN-GROUP tag -Requires the EXPECT attribute to be in the specified group tag. +\fBIN\-GROUP \fItag\fR +Requires the \fBEXPECT\fR attribute to be in the specified group tag. .TP 5 -OF-TYPE tag[,tag,...] -Requires the EXPECT attribute to use the specified value tag(s). +\fBOF\-TYPE \fItag[,tag,...]\fR +Requires the \fBEXPECT\fR attribute to use one of the specified value tag(s). .TP 5 -REPEAT-LIMIT number +\fBREPEAT\-LIMIT \fInumber\fR .br -Specifies the maximum number of times to repeat. The default value is 1000. +Specifies the maximum number of times to repeat if the \fBREPEAT-MATCH\fR or \fBREPEAT-NO-MATCH\fR predicate is specified. The default value is 1000. .TP 5 -REPEAT-MATCH +\fBREPEAT\-MATCH\fR .TP 5 -REPEAT-NO-MATCH -Specifies that the current test should be repeated when the EXPECT condition -matches or does not match. +\fBREPEAT\-NO\-MATCH\fR +Specifies that the current test should be repeated when the \fBEXPECT\fR condition matches or does not match. .TP 5 -SAME-COUNT-AS attribute-name -Requires the EXPECT attribute to have the same number of values as the specified -parallel attribute. +\fBSAME\-COUNT\-AS \fIattribute-name\fR +Requires the \fBEXPECT\fR attribute to have the same number of values as the specified parallel attribute. .TP 5 -WITH-ALL-HOSTNAMES "literal string" +\fBWITH\-ALL\-HOSTNAMES "\fIliteral string\fB"\fR .TP 5 -WITH-ALL-HOSTNAMES "/regular expression/" +\fBWITH\-ALL\-HOSTNAMES "/\fIregular expression\fB/"\fR Requires that all URI values contain a matching hostname. .TP 5 -WITH-ALL-RESOURCES "literal string" +\fBWITH\-ALL\-RESOURCES "\fIliteral string\fB"\fR .TP 5 -WITH-ALL-RESOURCES "/regular expression/" +\fBWITH\-ALL\-RESOURCES "/\fIregular expression\fB/"\fR Requires that all URI values contain a matching resource (including leading /). .TP 5 -WITH-ALL-SCHEMES "literal string" +\fBWITH\-ALL\-SCHEMES "\fIliteral string\fB"\fR .TP 5 -WITH-ALL-SCHEMES "/regular expression/" +\fBWITH\-ALL-SCHEMES "/\fIregular expression\fB/"\fR Requires that all URI values contain a matching scheme. .TP 5 -WITH-ALL-VALUES "literal string" -Requires that all values of the EXPECT attribute match the literal string. Comparisons are case-sensitive. +\fBWITH\-ALL\-VALUES "\fIliteral string\fB"\fR +Requires that all values of the \fBEXPECT\fR attribute match the literal string. Comparisons are case-sensitive. .TP 5 -WITH-ALL-VALUES number +\fBWITH\-ALL\-VALUES >\fInumber\fR .TP 5 -WITH-ALL-VALUES number[,number,...] -Requires that all values of the EXPECT attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range. +\fBWITH\-ALL\-VALUES \fInumber\fR[\fI,...,number\fR] +Requires that all values of the \fBEXPECT\fR attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range. .TP 5 -WITH-ALL-VALUES "false" +\fBWITH\-ALL\-VALUES "false"\fR .TP 5 -WITH-ALL-VALUES "true" -Requires that all values of the EXPECT attribute match the boolean value given. +\fBWITH\-ALL\-VALUES "true"\fR +Requires that all values of the \fBEXPECT\fR attribute match the boolean value given. .TP 5 -WITH-ALL-VALUES "/regular expression/" -Requires that all values of the EXPECT attribute match the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive. +\fBWITH\-ALL\-VALUES "/\fIregular expression\fB/"\fR +Requires that all values of the \fBEXPECT\fR attribute match the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive. .TP 5 -WITH-HOSTNAME "literal string" +\fBWITH\-HOSTNAME "\fIliteral string\fB"\fR .TP 5 -WITH-HOSTNAME "/regular expression/" +\fBWITH\-HOSTNAME "/\fIregular expression\fB/"\fR Requires that at least one URI value contains a matching hostname. .TP 5 -WITH-RESOURCE "literal string" +\fBWITH\-RESOURCE "\fIliteral string\fB"\fR .TP 5 -WITH-RESOURCE "/regular expression/" +\fBWITH\-RESOURCE "/\fIregular expression\fB/"\fR Requires that at least one URI value contains a matching resource (including leading /). .TP 5 -WITH-SCHEME "literal string" +\fBWITH\-SCHEME "\fIliteral string\fB"\fR .TP 5 -WITH-SCHEME "/regular expression/" +\fBWITH\-SCHEME "/\fIregular expression\fB/"\fR Requires that at least one URI value contains a matching scheme. .TP 5 -WITH-VALUE "literal string" -Requires that at least one value of the EXPECT attribute matches the literal string. Comparisons are case-sensitive. +\fBWITH\-VALUE "\fIliteral string\fB"\fR +Requires that at least one value of the \fBEXPECT\fR attribute matches the literal string. Comparisons are case-sensitive. .TP 5 -WITH-VALUE number +\fBWITH\-VALUE >\fInumber\fR .TP 5 -WITH-VALUE number[,number,...] -Requires that at least one value of the EXPECT attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range. +\fBWITH\-VALUE \fInumber\fR[\fI,...,number\fR] +Requires that at least one value of the \fBEXPECT\fR attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "<" and ">" operators only check the upper bound of the range. .TP 5 -WITH-VALUE "false" +\fBWITH\-VALUE "false"\fR .TP 5 -WITH-VALUE "true" -Requires that at least one value of the EXPECT attribute matches the boolean value given. +\fBWITH\-VALUE "true"\fR +Requires that at least one value of the \fBEXPECT\fR attribute matches the boolean value given. .TP 5 -WITH-VALUE "/regular expression/" -Requires that at least one value of the EXPECT attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive. - -.SH STATUS PREDICATES -The following predicates are understood following the STATUS test directive: +\fBWITH\-VALUE "/\fIregular expression\fB/"\fR +Requires that at least one value of the \fBEXPECT\fR attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive. +.SS STATUS PREDICATES +The following predicates are understood following the \fBSTATUS\fR test directive: .TP 5 -DEFINE-MATCH variable-name -Defines the variable to "1" when the STATUS matches. A side-effect of this predicate is that this STATUS will never fail a test. +\fBDEFINE\-MATCH \fIvariable-name\fR +Defines the variable to "1" when the \fBSTATUS\fR matches. A side-effect of this predicate is that this \fBSTATUS\fR will never fail a test. .TP 5 -DEFINE-NO-MATCH variable-name -Defines the variable to "1" when the STATUS does not match. A side-effect of this predicate is that this STATUS will never fail a test. +\fBDEFINE\-NO\-MATCH \fIvariable-name\fR +Defines the variable to "1" when the \fBSTATUS\fR does not match. A side-effect of this predicate is that this \fBSTATUS\fR will never fail a test. .TP 5 -IF-DEFINED variable-name -Makes the STATUS apply only if the specified variable is defined. +\fBIF\-DEFINED \fIvariable-name\fR +Makes the \fBSTATUS\fR apply only if the specified variable is defined. .TP 5 -IF-NOT-DEFINED variable-name -Makes the STATUS apply only if the specified variable is not defined. +\fBIF\-NOT\-DEFINED \fIvariable-name\fR +Makes the \fBSTATUS\fR apply only if the specified variable is not defined. .TP 5 -REPEAT-LIMIT number +\fBREPEAT\-LIMIT \fInumber\fR .br Specifies the maximum number of times to repeat. The default value is 1000. .TP 5 -REPEAT-MATCH +\fBREPEAT\-MATCH\fR .TP 5 -REPEAT-NO-MATCH -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. - -.SH OPERATION CODES -Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from -RFC 2911 and other IPP extension specifications. Here is a complete list: +\fBREPEAT\-NO\-MATCH\fR +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. +.SS OPERATION CODES +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 +.BR ipptool (8): .nf - Activate-Printer - CUPS-Accept-Jobs - CUPS-Add-Modify-Class - CUPS-Add-Modify-Printer - CUPS-Authenticate-Job - CUPS-Delete-Class - CUPS-Delete-Printer - CUPS-Get-Classes - CUPS-Get-Default - CUPS-Get-Devices - CUPS-Get-Document - CUPS-Get-PPD - CUPS-Get-PPDs - CUPS-Get-Printers - CUPS-Move-Job - CUPS-Reject-Jobs - CUPS-Set-Default - Cancel-Current-Job - Cancel-Job - Cancel-Jobs - Cancel-My-Jobs - Cancel-Subscription - Close-Job - Create-Job - Create-Job-Subscriptions - Create-Printer-Subscriptions - Deactivate-Printer - Disable-Printer - Enable-Printer - Get-Job-Attributes - Get-Jobs - Get-Notifications - Get-Printer-Attributes - Get-Printer-Support-Files - Get-Printer-Supported-Values - Get-Subscription-Attributes - Get-Subscriptions - Hold-Job - Hold-New-Jobs - Identify-Printer - Pause-Printer - Pause-Printer-After-Current-Job - Print-Job - Print-URI - Promote-Job - Purge-Jobs - Release-Held-New-Jobs - Release-Job - Renew-Subscription - Reprocess-Job - Restart-Job - Restart-Printer - Resubmit-Job - Resume-Job - Resume-Printer - Schedule-Job-After - Send-Document - Send-Hardcopy-Document - Send-Notifications - Send-URI - Set-Job-Attributes - Set-Printer-Attributes - Shutdown-Printer - Startup-Printer - Suspend-Current-Job - Validate-Document - Validate-Job -.fi -.SH STATUS CODES -Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC -2911 and other IPP extension specifications. Here is a complete list: -.nf - client-error-attributes-not-settable - client-error-attributes-or-values-not-supported - client-error-bad-request - client-error-charset-not-supported - client-error-compression-error - client-error-compression-not-supported - client-error-conflicting-attributes - client-error-document-access-error - client-error-document-format-error - client-error-document-format-not-supported - client-error-document-password-error - client-error-document-permission-error - client-error-document-security-error - client-error-document-unprintable-error - client-error-forbidden - client-error-gone - client-error-ignored-all-notifications - client-error-ignored-all-subscriptions - client-error-not-authenticated - client-error-not-authorized - client-error-not-found - client-error-not-possible - client-error-print-support-file-not-found - client-error-request-entity-too-large - client-error-request-value-too-long - client-error-timeout - client-error-too-many-subscriptions - client-error-uri-scheme-not-supported - cups-see-other - redirection-other-site - server-error-busy - server-error-device-error - server-error-internal-error - server-error-job-canceled - server-error-multiple-document-jobs-not-supported - server-error-not-accepting-jobs - server-error-operation-not-supported - server-error-printer-is-deactivated - server-error-service-unavailable - server-error-temporary-error - server-error-version-not-supported - successful-ok - successful-ok-but-cancel-subscription - successful-ok-conflicting-attributes - successful-ok-events-complete - successful-ok-ignored-notifications - successful-ok-ignored-or-substituted-attributes - successful-ok-ignored-subscriptions - successful-ok-too-many-events + Activate\-Printer + CUPS\-Accept\-Jobs + CUPS\-Add\-Modify\-Class + CUPS\-Add\-Modify\-Printer + CUPS\-Authenticate\-Job + CUPS\-Delete\-Class + CUPS\-Delete\-Printer + CUPS\-Get\-Classes + CUPS\-Get\-Default + CUPS\-Get\-Devices + CUPS\-Get\-Document + CUPS\-Get\-PPD + CUPS\-Get\-PPDs + CUPS\-Get\-Printers + CUPS\-Move\-Job + CUPS\-Reject\-Jobs + CUPS\-Set\-Default + Cancel\-Current\-Job + Cancel\-Job + Cancel\-Jobs + Cancel\-My\-Jobs + Cancel\-Subscription + Close\-Job + Create\-Job + Create\-Job\-Subscriptions + Create\-Printer\-Subscriptions + Deactivate\-Printer + Disable\-Printer + Enable\-Printer + Get\-Job\-Attributes + Get\-Jobs + Get\-Notifications + Get\-Printer\-Attributes + Get\-Printer\-Support\-Files + Get\-Printer\-Supported\-Values + Get\-Subscription\-Attributes + Get\-Subscriptions + Hold\-Job + Hold\-New\-Jobs + Identify\-Printer + Pause\-Printer + Pause\-Printer\-After\-Current\-Job + Print\-Job + Print\-URI + Promote\-Job + Purge\-Jobs + Release\-Held\-New\-Jobs + Release\-Job + Renew\-Subscription + Reprocess\-Job + Restart\-Job + Restart\-Printer + Resubmit\-Job + Resume\-Job + Resume\-Printer + Schedule\-Job\-After + Send\-Document + Send\-Hardcopy\-Document + Send\-Notifications + Send\-URI + Set\-Job\-Attributes + Set\-Printer\-Attributes + Shutdown\-Printer + Startup\-Printer + Suspend\-Current\-Job + Validate\-Document + Validate\-Job .fi +.SS STATUS CODES +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 +.BR ipptool (8): +.nf -.SH TAGS -Value and group tags correspond to the names from RFC 2911 and other IPP -extension specifications. Here are the group tags: + client\-error\-account\-authorization\-failed + client\-error\-account\-closed + client\-error\-account\-info\-needed + client\-error\-account\-limit\-reached + client\-error\-attributes\-not\-settable + client\-error\-attributes\-or\-values\-not\-supported + client\-error\-bad\-request + client\-error\-charset\-not\-supported + client\-error\-compression\-error + client\-error\-compression\-not\-supported + client\-error\-conflicting\-attributes + client\-error\-document\-access\-error + client\-error\-document\-format\-error + client\-error\-document\-format\-not\-supported + client\-error\-document\-password\-error + client\-error\-document\-permission\-error + client\-error\-document\-security\-error + client\-error\-document\-unprintable\-error + client\-error\-forbidden + client\-error\-gone + client\-error\-ignored\-all\-notifications + client\-error\-ignored\-all\-subscriptions + client\-error\-not\-authenticated + client\-error\-not\-authorized + client\-error\-not\-found + client\-error\-not\-possible + client\-error\-print\-support\-file\-not\-found + client\-error\-request\-entity\-too\-large + client\-error\-request\-value\-too\-long + client\-error\-timeout + client\-error\-too\-many\-subscriptions + client\-error\-uri\-scheme\-not\-supported + cups\-error\-account\-authorization\-failed + cups\-error\-account\-closed + cups\-error\-account\-info\-needed + cups\-error\-account\-limit\-reached + cups\-see\-other + redirection\-other\-site + server\-error\-busy + server\-error\-device\-error + server\-error\-internal\-error + server\-error\-job\-canceled + server\-error\-multiple\-document\-jobs\-not\-supported + server\-error\-not\-accepting\-jobs + server\-error\-operation\-not\-supported + server\-error\-printer\-is\-deactivated + server\-error\-service\-unavailable + server\-error\-temporary\-error + server\-error\-version\-not\-supported + successful\-ok + successful\-ok\-but\-cancel\-subscription + successful\-ok\-conflicting\-attributes + successful\-ok\-events\-complete + successful\-ok\-ignored\-notifications + successful\-ok\-ignored\-or\-substituted\-attributes + successful\-ok\-ignored\-subscriptions + successful\-ok\-too\-many\-events +.fi +.SS TAGS +Value and group tags correspond to the names from RFC 2911 and other IPP extension specifications. Here are the group tags: .nf - event-notification-attributes-tag - job-attributes-tag - operation-attributes-tag - printer-attributes-tag - subscription-attributes-tag - unsupported-attributes-tag + + document\-attributes\-tag + event\-notification\-attributes\-tag + job\-attributes\-tag + operation\-attributes\-tag + printer\-attributes\-tag + subscription\-attributes\-tag + unsupported\-attributes\-tag .fi .LP Here are the value tags: .nf - admin-define + + admin\-define boolean charset collection dateTime default - delete-attribute + delete\-attribute enum integer keyword @@ -551,8 +531,8 @@ Here are the value tags: nameWithLanguage nameWithoutLanguage naturalLanguage - no-value - not-settable + no\-value + not\-settable octetString rangeOfInteger resolution @@ -563,66 +543,71 @@ Here are the value tags: uri uriScheme .fi - -.SH VARIABLES -The \fIipptool\fR program maintains a list of variables that can be used in any -literal string or attribute value by specifying "$variable-name". Aside from -variables defined using the "-d" option or "DEFINE" directive, the following -pre-defined variables are available: +.SS VARIABLES +The +.BR ipptool (8) +program maintains a list of variables that can be used in any literal string or attribute value by specifying "\fI$variable-name\fR". Aside from variables defined using the \fI-d\fR option or \fBDEFINE\fR directive, the following pre-defined variables are available: .TP 5 -$$ +\fB$$\fR Inserts a single "$" character. .TP 5 -$ENV[name] -Inserts the value of the named environment variable, or an empty string if the -environment variable is not defined. +\fB$ENV[\fIname\fB]\fR +Inserts the value of the named environment variable, or an empty string if the environment variable is not defined. .TP 5 -$filename -Inserts the filename provided to \fIipptool\fR with the "-f" option. +\fB$filename\fR +Inserts the filename provided to +.BR ipptool (8) +with the \fI-f\fR option. .TP 5 -$hostname -Inserts the hostname from the URI provided to \fIipptool\fR. +\fB$filetype\fR +Inserts the MIME media type for the filename provided to +.BR ipptool (8) +with the \fI-f\fR option. .TP 5 -$job-id -Inserts the last job-id value returned in a test response or 0 if no job-id has -been seen. +\fB$hostname\fR +Inserts the hostname from the URI provided to +.BR ipptool (8). .TP 5 -$job-uri -Inserts the last job-uri value returned in a test response or an empty string if -no job-uri has been seen. +\fB$job\-id\fR +Inserts the last "job\-id" attribute value returned in a test response or 0 if no "job\-id" attribute has been seen. .TP 5 -$scheme -Inserts the scheme from the URI provided to \fIipptool\fR. +\fB$job\-uri\fR +Inserts the last "job\-uri" attribute value returned in a test response or an empty string if no "job\-uri" attribute has been seen. .TP 5 -$notify-subscription-id -Inserts the last notify-subscription-id value returned in a test response or 0 if -no notify-subscription-id has been seen. +\fB$notify\-subscription\-id\fR +Inserts the last "notify\-subscription\-id" attribute value returned in a test response or 0 if no "notify\-subscription\-id" attribute has been seen. .TP 5 -$port -Inserts the port number from the URI provided to \fIipptool\fR. +\fB$port\fR +Inserts the port number from the URI provided to +.BR ipptool (8). .TP 5 -$resource -Inserts the resource path from the URI provided to \fIipptool\fR. +\fB$resource\fR +Inserts the resource path from the URI provided to +.BR ipptool (8). .TP 5 -$uri -Inserts the URI provided to \fIipptool\fR. +\fB$scheme\fR +Inserts the scheme from the URI provided to +.BR ipptool (8). .TP 5 -$user -Inserts the current user's login name. +\fB$uri\fR +Inserts the URI provided to +.BR ipptool (8). .TP 5 -$username -Inserts the username from the URI provided to \fIipptool\fR, if any. - +\fB$uriuser\fR +Inserts the username from the URI provided to +.BR ipptool (8), +if any. +.TP 5 +\fB$user\fR +Inserts the current user's login name. .SH SEE ALSO -\fIipptool(1)\fR, RFC 2911, -.br -http://localhost:631/help -.br -http://www.iana.org/assignments/ipp-registrations -.br -http://www.pwg.org/ipp +.BR ipptool (1), +CUPS Online Help (http://localhost:631/help), +IANA IPP Registry (http://www.iana.org/assignments/ipp-registrations), +PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp), +RFC 2911 (http://tools.ietf.org/html/rfc3911) .SH COPYRIGHT -Copyright 2007-2014 by Apple Inc. +Copyright \[co] 2007-2014 by Apple Inc. .\" .\" End of "$Id$". .\"