]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Rename ipptest to ipptool.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 7 Apr 2010 06:54:31 +0000 (06:54 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 7 Apr 2010 06:54:31 +0000 (06:54 +0000)
Add CSV, formatted text, and "quiet" modes to ipptool.

Update IPP/2.0 and IPP/2.1 validation tests.

Add examples and installed files sections to ipptool man page.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9084 7a7537e8-13f0-0310-91df-b6672ffda945

21 files changed:
cups/ipp-private.h
cups/ipp-support.c
doc/Makefile
man/Makefile
man/ipptest.man [deleted file]
man/ipptool.man [new file with mode: 0644]
man/ipptoolfile.man [moved from man/ipp.test.man with 91% similarity]
packaging/cups.list.in
packaging/cups.spec.in
test/Makefile
test/create-printer-subscription.test
test/get-completed-jobs.test [new file with mode: 0644]
test/get-jobs.test
test/ipp-1.1.test
test/ipp-2.0.test
test/ipp-2.1.test
test/ipptool.c [moved from test/ipptest.c with 89% similarity]
test/run-stp-tests.sh
vc2005/ipptool.vcproj [moved from vc2005/ipptest.vcproj with 93% similarity]
vcnet/cups.sln
vcnet/ipptool.vcproj [moved from vcnet/ipptest.vcproj with 93% similarity]

index a1742dfabc442d06d9dabdc77c8e1c83230b57e4..8a473c110abd3e32e686abc98bc52eb33426fa07 100644 (file)
@@ -66,9 +66,11 @@ typedef struct                               /**** Attribute mapping data ****/
  * Prototypes for private functions...
  */
 
-extern ipp_attribute_t *_ippAddAttr(ipp_t *, int);
+extern ipp_attribute_t *_ippAddAttr(ipp_t *ipp, int num_values);
+extern size_t          _ippAttrString(ipp_attribute_t *attr, char *buffer,
+                                      size_t bufsize);
 extern _ipp_option_t   *_ippFindOption(const char *name);
-extern void            _ippFreeAttr(ipp_attribute_t *);
+extern void            _ippFreeAttr(ipp_attribute_t *attr);
 
 
 /*
index 4408e4e57af718c9aa80f65a778e3a7fe2b7f9ba..aa0ad0c630e2eca27217b643b4c04073f0854f5f 100644 (file)
@@ -16,6 +16,7 @@
  *
  * Contents:
  *
+ *   _ippAttrString() - Convert the attribute's value to a string.
  *   ippErrorString() - Return a name for the given status code.
  *   ippErrorValue()  - Return a status code for the given name.
  *   ippOpString()    - Return a name for the given operation id.
@@ -24,6 +25,7 @@
  *   ippSetPort()     - Set the default port number.
  *   ippTagString()   - Return the tag name corresponding to a tag value.
  *   ippTagValue()    - Return the tag value corresponding to a tag name.
+ *   ipp_col_string() - Convert a collection to a string.
  */
 
 /*
@@ -265,6 +267,244 @@ static char       * const ipp_std_ops[] =
                  "mimeMediaType",      /* 0x49 */
                  "memberAttrName"      /* 0x4a */
                };
+static const char * const job_states[] =
+{                                      /* job-state enums */
+  "pending",
+  "pending-held",
+  "processing",
+  "processing-stopped"
+  "canceled",
+  "aborted",
+  "completed"
+};
+static const char * const printer_states[] =
+{                                      /* printer-state enums */
+  "idle",
+  "processing",
+  "stopped",
+};
+
+
+/*
+ * Local functions...
+ */
+
+static size_t  ipp_col_string(ipp_t *col, char *buffer, size_t bufsize);
+
+
+/*
+ * '_ippAttrString()' - Convert the attribute's value to a string.
+ *
+ * Returns the number of bytes that would be written, not including the
+ * trailing nul. The buffer pointer can be NULL to get the required length,
+ * just like (v)snprintf.
+ */
+
+size_t                                 /* O - Number of bytes less nul */
+_ippAttrString(ipp_attribute_t *attr,  /* I - Attribute */
+               char            *buffer,        /* I - String buffer or NULL */
+               size_t          bufsize)        /* I - Size of string buffer */
+{
+  int          i;                      /* Looping var */
+  char         *bufptr,                /* Pointer into buffer */
+               *bufend,                /* End of buffer */
+               temp[256];              /* Temporary string */
+  const char   *ptr;                   /* Pointer into string */
+  ipp_value_t  *val;                   /* Current value */
+
+
+  if (!attr || !attr->name)
+  {
+    if (buffer)
+      *buffer = '\0';
+
+    return (0);
+  }
+
+  bufptr = buffer;
+  if (buffer)
+    bufend = buffer + bufsize - 1;
+  else
+    bufend = NULL;
+
+  for (i = attr->num_values, val = attr->values; i > 0; i --, val ++)
+  {
+    if (val > attr->values)
+    {
+      if (bufptr < bufend)
+        *bufptr++ = ',';
+      else
+        bufptr ++;
+    }
+
+    switch (attr->value_tag)
+    {
+      case IPP_TAG_ENUM :
+          if (!strcmp(attr->name, "printer-state") &&
+              val->integer >= IPP_PRINTER_IDLE &&
+              val->integer <= IPP_PRINTER_STOPPED)
+          {
+            ptr = printer_states[val->integer - IPP_PRINTER_IDLE];
+
+            if (bufptr < bufend)
+              strlcpy(bufptr, ptr, bufend - bufptr + 1);
+
+            bufptr += strlen(ptr);
+            break;
+          }
+          else if (!strcmp(attr->name, "job-state") &&
+                  val->integer >= IPP_JOB_PENDING &&
+                  val->integer <= IPP_JOB_COMPLETED)
+          {
+            ptr = job_states[val->integer - IPP_JOB_PENDING];
+
+            if (bufptr < bufend)
+              strlcpy(bufptr, ptr, bufend - bufptr + 1);
+
+            bufptr += strlen(ptr);
+            break;
+          }
+
+      case IPP_TAG_INTEGER :
+          if (bufptr < bufend)
+            bufptr += snprintf(bufptr, bufend - bufptr + 1, "%d", val->integer);
+          else
+            bufptr += snprintf(temp, sizeof(temp), "%d", val->integer);
+          break;
+
+      case IPP_TAG_BOOLEAN :
+          if (bufptr < bufend)
+            strlcpy(bufptr, val->boolean ? "true" : "false",
+                    bufend - bufptr + 1);
+
+          bufptr += val->boolean ? 4 : 5;
+          break;
+
+      case IPP_TAG_RANGE :
+          if (bufptr < bufend)
+            bufptr += snprintf(bufptr, bufend - bufptr + 1, "%d-%d",
+                               val->range.lower, val->range.upper);
+          else
+            bufptr += snprintf(temp, sizeof(temp), "%d-%d", val->range.lower,
+                               val->range.upper);
+          break;
+
+      case IPP_TAG_RESOLUTION :
+          if (bufptr < bufend)
+            bufptr += snprintf(bufptr, bufend - bufptr + 1, "%dx%d%s",
+                               val->resolution.xres, val->resolution.yres,
+                               val->resolution.units == IPP_RES_PER_INCH ?
+                                   "dpi" : "dpc");
+          else
+            bufptr += snprintf(temp, sizeof(temp), "%dx%d%s",
+                               val->resolution.xres, val->resolution.yres,
+                               val->resolution.units == IPP_RES_PER_INCH ?
+                                   "dpi" : "dpc");
+          break;
+
+      case IPP_TAG_DATE :
+          {
+            unsigned year;             /* Year */
+
+            year = (val->date[0] << 8) + val->date[1];
+
+           if (val->date[9] == 0 && val->date[10] == 0)
+             snprintf(temp, sizeof(temp), "%04u-%02u-%02uT%02u:%02u:%02uZ",
+                      year, val->date[2], val->date[3], val->date[4],
+                      val->date[5], val->date[6]);
+           else
+             snprintf(temp, sizeof(temp),
+                      "%04u-%02u-%02uT%02u:%02u:%02u%c%02u%02u",
+                      year, val->date[2], val->date[3], val->date[4],
+                      val->date[5], val->date[6], val->date[8], val->date[9],
+                      val->date[10]);
+
+            if (bufptr < bufend)
+              strlcpy(bufptr, temp, bufend - bufptr + 1);
+
+            bufptr += strlen(temp);
+          }
+          break;
+
+      case IPP_TAG_TEXT :
+      case IPP_TAG_NAME :
+      case IPP_TAG_KEYWORD :
+      case IPP_TAG_CHARSET :
+      case IPP_TAG_URI :
+      case IPP_TAG_MIMETYPE :
+      case IPP_TAG_LANGUAGE :
+      case IPP_TAG_TEXTLANG :
+      case IPP_TAG_NAMELANG :
+          for (ptr = val->string.text; *ptr; ptr ++)
+          {
+            if (*ptr == '\\' || *ptr == '\"')
+            {
+              if (bufptr < bufend)
+                *bufptr = '\\';
+              bufptr ++;
+            }
+
+            if (bufptr < bufend)
+              *bufptr = *ptr;
+            bufptr ++;
+          }
+          break;
+
+      case IPP_TAG_BEGIN_COLLECTION :
+          if (bufptr < bufend)
+            bufptr += ipp_col_string(val->collection, bufptr,
+                                     bufend - bufptr + 1);
+          else
+            bufptr += ipp_col_string(val->collection, NULL, 0);
+          break;
+
+      case IPP_TAG_STRING :
+          for (ptr = val->string.text; *ptr; ptr ++)
+          {
+            if (*ptr == '\\' || isspace(*ptr & 255))
+            {
+              if (bufptr < bufend)
+                *bufptr = '\\';
+              bufptr ++;
+
+              if (bufptr < bufend)
+                *bufptr = *ptr;
+              bufptr ++;
+            }
+            else if (!isprint(*ptr & 255))
+            {
+              if (bufptr < bufend)
+                bufptr += snprintf(bufptr, bufend - bufptr + 1, "\\%03o",
+                                   *ptr & 255);
+              else
+                bufptr += snprintf(temp, sizeof(temp), "\\%03o",
+                                   *ptr & 255);
+            }
+            else
+            {
+              if (bufptr < bufend)
+                *bufptr = *ptr;
+              bufptr ++;
+            }
+          }
+          break;
+
+      default :
+          ptr = ippTagString(attr->value_tag);
+          if (bufptr < bufend)
+            strlcpy(bufptr, ptr, bufend - bufptr + 1);
+          bufptr += strlen(ptr);
+          break;
+    }
+  }
+
+  if (bufptr < bufend)
+    *bufptr = '\0';
+  else if (bufend)
+    *bufend = '\0';
+
+  return (bufptr - buffer);
+}
 
 
 /*
@@ -507,6 +747,52 @@ ippTagValue(const char *name)              /* I - Tag name */
 }
 
 
+/*
+ * 'ipp_col_string()' - Convert a collection to a string.
+ */
+
+static size_t                          /* O - Number of bytes */
+ipp_col_string(ipp_t  *col,            /* I - Collection attribute */
+               char   *buffer,         /* I - Buffer or NULL */
+               size_t bufsize)         /* I - Size of buffer */
+{
+  char                 *bufptr,        /* Position in buffer */
+                       *bufend,        /* End of buffer */
+                       temp[256];      /* Temporary string */
+  ipp_attribute_t      *attr;          /* Current member attribute */
+
+
+  bufptr = buffer;
+  bufend = buffer + bufsize - 1;
+
+  if (bufptr < bufend)
+    *bufptr = '{';
+  bufptr ++;
+
+  for (attr = col->attrs; attr; attr = attr->next)
+  {
+    if (!attr->name)
+      continue;
+
+    if (bufptr < bufend)
+      bufptr += snprintf(bufptr, bufend - bufptr + 1, "%s=", attr->name);
+    else
+      bufptr += snprintf(temp, sizeof(temp), "%s=", attr->name);
+
+    if (bufptr < bufend)
+      bufptr += _ippAttrString(attr, bufptr, bufend - bufptr + 1);
+    else
+      bufptr += _ippAttrString(attr, temp, sizeof(temp));
+  }
+
+  if (bufptr < bufend)
+    *bufptr = '}';
+  bufptr ++;
+
+  return (bufptr - buffer);
+}
+
+
 /*
  * End of "$Id$".
  */
index 009ed8736099c48116af01fa7a96d3389d6719f6..e3ae1cd965e2d50b1783a72d812b339549f97d03 100644 (file)
@@ -71,6 +71,8 @@ HELPFILES     =       \
                        help/man-cupstestppd.html \
                        help/man-drv.html \
                        help/man-filter.html \
+                       help/man-ipptool.html \
+                       help/man-ipptoolfile.html \
                        help/man-lp.html \
                        help/man-lpadmin.html \
                        help/man-lpc.html \
index f6f0bb281e046b470a72c874dd541718c94afe83..0ad49b12a1c40a1d8083820c515247a510e76ba5 100644 (file)
@@ -1,7 +1,7 @@
 #
 # "$Id$"
 #
-#   Man page makefile for the Common UNIX Printing System (CUPS).
+#   Man page makefile for CUPS.
 #
 #   Copyright 2007-2010 by Apple Inc.
 #   Copyright 1993-2006 by Easy Software Products.
@@ -24,7 +24,7 @@ MAN1  =       cancel.$(MAN1EXT) \
                cups-config.$(MAN1EXT) \
                cupstestdsc.$(MAN1EXT) \
                cupstestppd.$(MAN1EXT) \
-               ipptest.$(MAN1EXT) \
+               ipptool.$(MAN1EXT) \
                lp.$(MAN1EXT) \
                lpoptions.$(MAN1EXT) \
                lppasswd.$(MAN1EXT) \
@@ -41,7 +41,7 @@ MAN5  =       classes.conf.$(MAN5EXT) \
                client.conf.$(MAN5EXT) \
                cups-snmp.conf.$(MAN5EXT) \
                cupsd.conf.$(MAN5EXT) \
-               ipp.test.$(MAN5EXT) \
+               ipptoolfile.$(MAN5EXT) \
                mailto.conf.$(MAN5EXT) \
                mime.convs.$(MAN5EXT) \
                mime.types.$(MAN5EXT) \
diff --git a/man/ipptest.man b/man/ipptest.man
deleted file mode 100644 (file)
index 2d14676..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-.\"
-.\" "$Id$"
-.\"
-.\"   ipptest man page for CUPS.
-.\"
-.\"   Copyright 2010 by Apple Inc.
-.\"
-.\"   These coded instructions, statements, and computer programs are the
-.\"   property of Apple Inc. and are protected by Federal copyright
-.\"   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-.\"   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 ipptest 1 "CUPS" "15 February 2010" "Apple Inc."
-.SH NAME
-ipptest - perform internet printing protocol tests
-.SH SYNOPSIS
-.B ipptest
-[ -E ] [ -V
-.I version
-] [ -X ] [ -c ] [ -d
-.I name=value
-] [ -f
-.I filename
-] [ -i
-.I seconds
-] [ -l ] [ -v ] 
-.I URI
-.I filename.test
-[
-.I ... filenameN.test
-]
-.SH DESCRIPTION
-\fIipptest\fR sends IPP requests to the specified URI and tests the results.
-Each test file contains one or more test requests, including the expected
-response status, attributes, and values.  Output is either a plain text or XML
-report on the standard output, with a non-zero exit status indicating that one
-or more tests have failed. The test file format is described in
-\fIipp.test(5)\fR.
-.SH OPTIONS
-The following options are recognized by \fIipptest\fR:
-.TP 5
--E
-Forces encryption when connecting to the server.
-.TP 5
--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) option.
-.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.
-.TP 5
--d name=value
-Defines the named variable.
-.TP 5
--f filename
-Defines the default request filename for tests.
-.TP 5
--i seconds
-Specifies that the (last) test should be repeated at the specified interval.
-This option is incompatible with the \fI-X\fR (XML output) option.
-.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.
-.TP 5
--v
-Specifies that all request and response attributes should be output. This is the
-default for XML output.
-.SH COMPATIBILITY
-The \fIipptest\fR program is unique to CUPS.
-.SH SEE ALSO
-\fIipp.test(5)\fR,
-.br
-http://localhost:631/help
-.SH COPYRIGHT
-Copyright 2007-2010 by Apple Inc.
-.\"
-.\" End of "$Id$".
-.\"
diff --git a/man/ipptool.man b/man/ipptool.man
new file mode 100644 (file)
index 0000000..89dbf3d
--- /dev/null
@@ -0,0 +1,116 @@
+.\"
+.\" "$Id$"
+.\"
+.\"   ipptool man page for CUPS.
+.\"
+.\"   Copyright 2010 by Apple Inc.
+.\"
+.\"   These coded instructions, statements, and computer programs are the
+.\"   property of Apple Inc. and are protected by Federal copyright
+.\"   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+.\"   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" "6 April 2010" "Apple Inc."
+.SH NAME
+ipptool - perform internet printing protocol requests
+.SH SYNOPSIS
+.B ipptool
+[ -C ] [ -E ] [ -L ] [ -S ] [ -V
+.I version
+] [ -X ] [ -c ] [ -d
+.I name=value
+] [ -f
+.I filename
+] [ -i
+.I seconds
+] [ -n
+.I repeat-count
+] [ -q ] [ -t ] [ -v ]
+.I URI
+.I filename
+[
+.I ... filenameN
+]
+.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.
+.SH OPTIONS
+The following options are recognized by \fIipptool\fR:
+.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.
+.TP 5
+-E
+Forces TLS encryption when connecting to the server using the HTTP "Upgrade" header.
+.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.
+.TP 5
+-S
+Forces (dedicated) SSL encryption when connecting to the server.
+.TP 5
+-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.
+.TP 5
+-c
+Specifies that CSV (comma-separated values) output is desired instead of the plain text output.
+.TP 5
+-d name=value
+Defines the named variable.
+.TP 5
+-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.
+.TP 5
+-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.
+.TP 5
+-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 COMPATIBILITY
+The \fIipptool\fR program is unique to CUPS.
+.SH EXAMPLES
+Get a list of completed jobs for "myprinter":
+.nf
+    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
+    create-printer-subscription.test
+    get-completed-jobs.test
+    get-jobs.test
+    ipp-1.1.test
+    ipp-2.0.test
+    ipp-2.1.test
+    testfile.jpg
+    testfile.pdf
+    testfile.ps
+    testfile.txt
+.fi
+.SH SEE ALSO
+\fIipptoolfile(5)\fR,
+.br
+http://localhost:631/help
+.SH COPYRIGHT
+Copyright 2007-2010 by Apple Inc.
+.\"
+.\" End of "$Id$".
+.\"
similarity index 91%
rename from man/ipp.test.man
rename to man/ipptoolfile.man
index 766180f303819a3fd60fa76ee3039e755d7d81a2..0f59b67ce983c48b52edafc22338253a4b39aeb3 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" "$Id$"
 .\"
-.\"   ipp.test man page for CUPS.
+.\"   ipptoolfile man page for CUPS.
 .\"
 .\"   Copyright 2010 by Apple Inc.
 .\"
 .\"   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 ipp.test 5 "CUPS" "4 April 2010" "Apple Inc."
+.TH ipptoolfile 5 "CUPS" "6 April 2010" "Apple Inc."
 .SH NAME
-ipp.test \- ipptest test file format
+ipptoolfile \- ipptool file format
 
 .SH DESCRIPTION
-The \fIipptest(1)\fR program accepts free-form plain text files that describe
-one or more IPP operation tests. Comments start with the "#" character and
-continue to the end of the line. Each test is enclosed by curley braces, for
-example:
+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 curley braces, for example:
 .nf
 
     # This is a comment
@@ -75,13 +72,13 @@ 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 \fIipptest\fR command-line.
+"-d variable-name=value" on the \fIipptool\fR command-line.
 .TP 5
 INCLUDE "filename"
 .TP 5
 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 \fIipptest\fR
+current test file, while the second form includes a file from the \fIipptool\fR
 include directory.
 .TP 5
 TRANSFER auto
@@ -92,12 +89,12 @@ 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
-\fIipptest\fR command-line. Support for chunked requests is required for
+\fIipptool\fR 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 \fIipptest\fR command-line.
+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.
 .TP 5
@@ -161,7 +158,7 @@ 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 \fIipptest\fR program.
+The default is the resource from the URI provided to the \fIipptool\fR program.
 .TP 5
 STATUS status-code [ predicate ]
 Specifies an expected response status-code value. Additional requirements can be
@@ -394,7 +391,7 @@ Here are the value tags:
 .fi
 
 .SH VARIABLES
-The \fIipptest\fR program maintains a list of variables that can be used in any
+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:
@@ -407,10 +404,10 @@ 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 \fIipptest\fR with the "-f" option.
+Inserts the filename provided to \fIipptool\fR with the "-f" option.
 .TP 5
 $hostname
-Inserts the hostname from the URI provided to \fIipptest\fR.
+Inserts the hostname from the URI provided to \fIipptool\fR.
 .TP 5
 $job-id
 Inserts the last job-id value returned in a test response or 0 if no job-id has
@@ -421,29 +418,29 @@ Inserts the last job-uri value returned in a test response or an empty string if
 no job-uri has been seen.
 .TP 5
 $scheme
-Inserts the scheme from the URI provided to \fIipptest\fR.
+Inserts the scheme from the URI provided to \fIipptool\fR.
 .TP 5
 $notify-subscription-id
 Inserts the last notify-subscription-id value returnd in a test response or 0 if
 no notify-subscription-id has been seen.
 .TP 5
 $port
-Inserts the port number from the URI provided to \fIipptest\fR.
+Inserts the port number from the URI provided to \fIipptool\fR.
 .TP 5
 $resource
-Inserts the resource path from the URI provided to \fIipptest\fR.
+Inserts the resource path from the URI provided to \fIipptool\fR.
 .TP 5
 $uri
-Inserts the URI provided to \fIipptest\fR.
+Inserts the URI provided to \fIipptool\fR.
 .TP 5
 $user
 Inserts the current user's login name.
 .TP 5
 $username
-Inserts the username from the URI provided to \fIipptest\fR, if any.
+Inserts the username from the URI provided to \fIipptool\fR, if any.
 
 .SH SEE ALSO
-\fIipptest(1)\fR,
+\fIipptool(1)\fR,
 .br
 http://localhost:631/help
 
index 4ef73ab17687c6e81e9040ee5a3b203f2a22b27c..a13cf7fd9f31c7f167a477d548f8d0203abb80a8 100644 (file)
@@ -349,7 +349,7 @@ d 0755 root sys $BINDIR -
 f 0555 root sys $BINDIR/cancel systemv/cancel
 f 0555 root sys $BINDIR/cupstestdsc systemv/cupstestdsc
 f 0555 root sys $BINDIR/cupstestppd systemv/cupstestppd
-f 0555 root sys $BINDIR/ipptest test/ipptest
+f 0555 root sys $BINDIR/ipptool test/ipptool
 f 0555 root sys $BINDIR/lp systemv/lp
 f 0555 root sys $BINDIR/lpoptions systemv/lpoptions
 f 0555 root sys $BINDIR/lppasswd systemv/lppasswd
@@ -515,9 +515,12 @@ f 0444 root sys $DATADIR/examples examples/*.drv
 d 0755 root sys $DATADIR/fonts -
 f 0444 root sys $DATADIR/fonts fonts/Monospace*
 
-d 0755 root sys $DATADIR/ipptest -
-f 0444 root sys $DATADIR/ipptest test/ipp-*.test
-f 0444 root sys $DATADIR/ipptest test/testfile.*
+d 0755 root sys $DATADIR/ipptool -
+f 0444 root sys $DATADIR/ipptool/create-printer-subscription.test test/create-printer-subscription.test
+f 0444 root sys $DATADIR/ipptool/get-completed-jobs.test test/get-completed-jobs.test
+f 0444 root sys $DATADIR/ipptool/get-jobs.test test/get-jobs.test
+f 0444 root sys $DATADIR/ipptool test/ipp-*.test
+f 0444 root sys $DATADIR/ipptool test/testfile.*
 
 d 0755 root sys $DATADIR/mime -
 f 0444 root sys $DATADIR/mime/mime.convs conf/mime.convs
@@ -701,7 +704,7 @@ d 0755 root sys $MANDIR/man7 -
 f 0444 root sys $MANDIR/man1/cancel.$MAN1EXT man/cancel.$MAN1EXT
 f 0444 root sys $MANDIR/man1/cupstestdsc.$MAN1EXT man/cupstestdsc.$MAN1EXT
 f 0444 root sys $MANDIR/man1/cupstestppd.$MAN1EXT man/cupstestppd.$MAN1EXT
-f 0444 root sys $MANDIR/man1/ipptest.$MAN1EXT man/ipptest.$MAN1EXT
+f 0444 root sys $MANDIR/man1/ipptool.$MAN1EXT man/ipptool.$MAN1EXT
 f 0444 root sys $MANDIR/man1/lpoptions.$MAN1EXT man/lpoptions.$MAN1EXT
 f 0444 root sys $MANDIR/man1/lppasswd.$MAN1EXT man/lppasswd.$MAN1EXT
 f 0444 root sys $MANDIR/man1/lpq.$MAN1EXT man/lpq.$MAN1EXT
@@ -712,7 +715,7 @@ f 0444 root sys $MANDIR/man1/lp.$MAN1EXT man/lp.$MAN1EXT
 
 f 0444 root sys $MANDIR/man5/classes.conf.$MAN5EXT man/classes.conf.$MAN5EXT
 f 0444 root sys $MANDIR/man5/cupsd.conf.$MAN5EXT man/cupsd.conf.$MAN5EXT
-f 0444 root sys $MANDIR/man5/ipp.test.$MAN5EXT man/ipp.test.$MAN5EXT
+f 0444 root sys $MANDIR/man5/ipptoolfile.$MAN5EXT man/ipptoolfile.$MAN5EXT
 f 0444 root sys $MANDIR/man5/mailto.conf.$MAN5EXT man/mailto.conf.$MAN5EXT
 f 0444 root sys $MANDIR/man5/mime.convs.$MAN5EXT man/mime.convs.$MAN5EXT
 f 0444 root sys $MANDIR/man5/mime.types.$MAN5EXT man/mime.types.$MAN5EXT
index cbf93f2b7781a47404127bff61cccae53160ed49..a05ea428a69a3b6a3b1eeb30cc1fa76582fb4139 100644 (file)
@@ -185,7 +185,7 @@ rm -rf $RPM_BUILD_ROOT
 /usr/bin/cancel
 /usr/bin/cupstestdsc
 /usr/bin/cupstestppd
-/usr/bin/ipptest
+/usr/bin/ipptool
 /usr/bin/lp*
 %dir /usr/lib/cups
 %dir /usr/lib/cups/backend
@@ -226,8 +226,8 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/cups/drv/*
 %dir /usr/share/cups/fonts
 /usr/share/cups/fonts/*
-%dir /usr/share/cups/ipptest
-/usr/share/cups/ipptest/*
+%dir /usr/share/cups/ipptool
+/usr/share/cups/ipptool/*
 %dir /usr/share/cups/mime
 /usr/share/cups/mime/*
 %dir /usr/share/cups/model
@@ -276,7 +276,7 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/man/man1/cancel.1.gz
 /usr/share/man/man1/cupstestdsc.1.gz
 /usr/share/man/man1/cupstestppd.1.gz
-/usr/share/man/man1/ipptest.1.gz
+/usr/share/man/man1/ipptool.1.gz
 /usr/share/man/man1/lp.1.gz
 /usr/share/man/man1/lpoptions.1.gz
 /usr/share/man/man1/lppasswd.1.gz
@@ -286,7 +286,7 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/man/man1/lpstat.1.gz
 %dir /usr/share/man/man5
 /usr/share/man/man5/*.conf.5.gz
-/usr/share/man/man5/ipp.test.5.gz
+/usr/share/man/man5/ipptoolfile.5.gz
 /usr/share/man/man5/mime.*.5.gz
 %dir /usr/share/man/man7
 /usr/share/man/man7/drv*
index 7b76a48bd4bb4a7f055f52af44079a80f3341d72..a39d351ced1450a6b190acbd29b84ae98e0a1ef5 100644 (file)
@@ -21,6 +21,9 @@ include ../Makedefs
 #
 
 TESTFILES      =       \
+                       create-printer-subscription.test \
+                       get-completed-jobs.test \
+                       get-jobs.test \
                        ipp-1.1.test \
                        ipp-2.0.test \
                        ipp-2.1.test \
@@ -34,7 +37,7 @@ TESTFILES     =       \
 # Make all targets...
 #
 
-all:   ipptest ipptest-static
+all:   ipptool ipptool-static
 
 
 #
@@ -56,7 +59,7 @@ unittests:
 #
 
 clean:
-       $(RM) ipptest ipptest.o ipptest-static
+       $(RM) ipptool ipptool.o ipptool-static
 
 
 #
@@ -64,7 +67,7 @@ clean:
 #
 
 depend:
-       makedepend -Y -I.. -fDependencies ipptest.c >/dev/null 2>&1
+       makedepend -Y -I.. -fDependencies ipptool.c >/dev/null 2>&1
 
 
 #
@@ -79,10 +82,10 @@ install:    all install-data install-headers install-libs install-exec
 #
 
 install-data:
-       echo Installing sample ipptest files in $(DATADIR)/ipptest...
-       $(INSTALL_DIR) -m 755 $(DATADIR)/ipptest
+       echo Installing sample ipptool files in $(DATADIR)/ipptool...
+       $(INSTALL_DIR) -m 755 $(DATADIR)/ipptool
        for file in $(TESTFILES); do \
-               $(INSTALL_DATA) $$file $(DATADIR)/ipptest; \
+               $(INSTALL_DATA) $$file $(DATADIR)/ipptool; \
        done
 
 
@@ -91,12 +94,12 @@ install-data:
 #
 
 install-exec:
-       echo Installing ipptest in $(BINDIR)...
+       echo Installing ipptool in $(BINDIR)...
        $(INSTALL_DIR) -m 755 $(BINDIR)
-       $(INSTALL_BIN) ipptest $(BINDIR)
+       $(INSTALL_BIN) ipptool $(BINDIR)
        if test "x$(SYMROOT)" != "x"; then \
                $(INSTALL_DIR) $(SYMROOT); \
-               cp ipptest $(SYMROOT); \
+               cp ipptool $(SYMROOT); \
        fi
 
 
@@ -122,21 +125,21 @@ uninstall:
 
 
 #
-# ipptest
+# ipptool
 #
 
-ipptest:       ipptest.o ../cups/$(LIBCUPS)
+ipptool:       ipptool.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ipptest.o $(LIBS)
+       $(CC) $(LDFLAGS) -o $@ ipptool.o $(LIBS)
 
 
 #
-# ipptest-static
+# ipptool-static
 #
 
-ipptest-static:        ipptest.o ../cups/$(LIBCUPSSTATIC)
+ipptool-static:        ipptool.o ../cups/$(LIBCUPSSTATIC)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ ipptest.o  ../cups/$(LIBCUPSSTATIC) \
+       $(CC) $(LDFLAGS) -o $@ ipptool.o  ../cups/$(LIBCUPSSTATIC) \
                $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
 
 
index c6427ef76eac3ef728a4799d80cbfaf9ee421d8a..61959172954f7ea7e7d93712a47240549f6dc990 100644 (file)
@@ -1,36 +1,49 @@
 #
-# "$Id: 4.4-subscription-ops.test 4840 2005-11-14 21:53:30Z mike $"
+# "$Id$"
 #
-#   Verify that the CUPS subscription operations work.
+#   Create a printer subscription.
 #
+#   Copyright 2007-2010 by Apple Inc.
+#   Copyright 2001-2006 by Easy Software Products. All rights reserved.
+#
+#   These coded instructions, statements, and computer programs are the
+#   property of Apple Inc. and are protected by Federal copyright
+#   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+#   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/".
+#
+# Usage:
+#
+#   ./ipptool -d recipient=uri printer-uri create-printer-subscription.test
+#
+
+
 {
        # The name of the test...
-       NAME "Add Printer Subscription w/Lease"
+       NAME "Create a printer subscription"
 
        # The operation to use
        OPERATION Create-Printer-Subscription
-       RESOURCE /
 
        # The attributes to send
-       GROUP operation
+       GROUP operation-attributes-tag
        ATTR charset attributes-charset utf-8
        ATTR language attributes-natural-language en
        ATTR uri printer-uri $uri
 
-        GROUP subscription
-       ATTR uri notify-recipient testnotify://nowait
+        GROUP subscription-attributes-tag
+       ATTR uri notify-recipient $recipient
        ATTR keyword notify-events printer-state-changed
 
        # What statuses are OK?
        STATUS successful-ok
 
        # What attributes do we expect?
-       EXPECT attributes-charset
-       EXPECT attributes-natural-language
-       EXPECT notify-subscription-id
+       EXPECT notify-subscription-id OF-TYPE integer WITH-VALUE >0
        DISPLAY notify-subscription-id
 }
 
+
 #
-# End of "$Id: 4.4-subscription-ops.test 4840 2005-11-14 21:53:30Z mike $"
+# End of "$Id$"
 #
diff --git a/test/get-completed-jobs.test b/test/get-completed-jobs.test
new file mode 100644 (file)
index 0000000..84ce9e6
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# "$Id$"
+#
+#   Get list of completed jobs.
+#
+#   Copyright 2007-2010 by Apple Inc.
+#   Copyright 2001-2006 by Easy Software Products. All rights reserved.
+#
+#   These coded instructions, statements, and computer programs are the
+#   property of Apple Inc. and are protected by Federal copyright
+#   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+#   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/".
+#
+# Usage:
+#
+#   ./ipptool printer-uri get-jobs.test
+#
+
+
+{
+       # The name of the test...
+       NAME "Get completed jobs"
+
+       # The operation to use
+       OPERATION Get-Jobs
+
+       # Attributes, starting in the operation group...
+       GROUP operation-attributes-tag
+       ATTR charset attributes-charset utf-8
+       ATTR language attributes-natural-language en
+       ATTR uri printer-uri $uri
+       ATTR keyword which-jobs completed
+       ATTR keyword requested-attributes
+            job-id,job-name,document-format,job-media-sheets-completed,job-originating-user-name
+
+       # What statuses are OK?
+       STATUS successful-ok
+
+       # What attributes to display
+       DISPLAY job-id
+       DISPLAY job-name
+       DISPLAY document-format
+       DISPLAY job-media-sheets-completed
+       DISPLAY job-originating-user-name
+}
+
+
+#
+# End of "$Id$".
+#
index 1b4ed20104ab7cbb3dc0abf8b4bbc83c5964aa4d..212b3fbc2fad8e269a083113b744fb51e8485037 100644 (file)
@@ -1,21 +1,50 @@
-# Get list of jobs
+#
+# "$Id$"
+#
+#   Get list of not-completed jobs.
+#
+#   Copyright 2007-2010 by Apple Inc.
+#   Copyright 2001-2006 by Easy Software Products. All rights reserved.
+#
+#   These coded instructions, statements, and computer programs are the
+#   property of Apple Inc. and are protected by Federal copyright
+#   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+#   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/".
+#
+# Usage:
+#
+#   ./ipptool printer-uri get-jobs.test
+#
+
+
 {
        # The name of the test...
-       NAME "Get-Jobs"
-
-       # The resource to use for the POST
-       # RESOURCE /admin
+       NAME "Get pending jobs"
 
        # The operation to use
        OPERATION Get-Jobs
 
        # Attributes, starting in the operation group...
-       GROUP operation
+       GROUP operation-attributes-tag
        ATTR charset attributes-charset utf-8
        ATTR language attributes-natural-language en
        ATTR uri printer-uri $uri
-#      ATTR keyword which-jobs completed
+       ATTR keyword requested-attributes
+            job-id,job-name,document-format,job-media-sheets-completed,job-originating-user-name
 
        # What statuses are OK?
        STATUS successful-ok
+
+       # What attributes to display
+       DISPLAY job-id
+       DISPLAY job-name
+       DISPLAY document-format
+       DISPLAY job-media-sheets-completed
+       DISPLAY job-originating-user-name
 }
+
+
+#
+# End of "$Id$".
+#
index bdc1fd610c3b22b5bfcda1ede7755c8586103841..0d1394ff4a24cf93c6bbc43b69ad9a1fc17314d8 100644 (file)
@@ -14,7 +14,7 @@
 #
 # Usage:
 #
-#   ./ipptest -f filename printer-uri ipp-1.1.test
+#   ./ipptool -f filename -t printer-uri ipp-1.1.test
 #
 
 # Test that a request-id value of 0 is not accepted.
index 0c6778804e73f77e3ebfbc7dec954cf94c0df26c..3030f21d713cc8adc1f791625a049ee320a175a7 100644 (file)
@@ -14,7 +14,7 @@
 #
 # Usage:
 #
-#   ./ipptest -V 2.0 -f filename printer-uri ipp-2.0.test
+#   ./ipptool -V 2.0 -f filename -t printer-uri ipp-2.0.test
 #
 
 # Do all of the IPP/1.1 tests as an IPP/2.0 client
@@ -39,66 +39,31 @@ INCLUDE "ipp-1.1.test"
        STATUS successful-ok
 
        # Job template attributes
-       EXPECT ?media-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?media-ready OF-TYPE keyword|name IN-GROUP printer-attributes-tag
-       EXPECT ?media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
-       EXPECT ?multiple-document-handling-default OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(single-document|separate-documents-uncollated-copies|separate-documents-collated-copies|single-document-new-sheet)$$/"
-       EXPECT ?multiple-document-handling-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(single-document|separate-documents-uncollated-copies|separate-documents-collated-copies|single-document-new-sheet)$$/"
-       EXPECT ?number-up-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
-       EXPECT ?number-up-supported OF-TYPE integer|rangeOfInteger IN-GROUP printer-attributes-tag WITH-VALUE >0
-       EXPECT ?number-up-supported WITH-VALUE 1
-       EXPECT ?orientation-requested-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6
-       EXPECT ?orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6
-       EXPECT ?pages-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag
-       EXPECT ?print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
-       EXPECT ?print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5
-       EXPECT ?printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
-       EXPECT ?sides-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
-       EXPECT ?sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
+       EXPECT copies-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
+       EXPECT copies-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag
+       EXPECT finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag
+       EXPECT finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3
+       EXPECT media-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
+       EXPECT orientation-requested-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6
+       EXPECT orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6
+       EXPECT output-bin-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT output-bin-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
+       EXPECT print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
+       EXPECT print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5
+       EXPECT printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
+       EXPECT sides-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
+       EXPECT sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
 
        # Printer description attributes
-       EXPECT ?color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?job-impressions-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?job-k-octets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?job-media-sheets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?multiple-document-jobs-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?multiple-operation-time-out OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
-       EXPECT ?pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-driver-installer OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
-       EXPECT ?printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
-       EXPECT ?printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
-       EXPECT ?printer-message-from-operator OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
-       EXPECT ?printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-more-info-manufacturer OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-state-message OF-TYPE text IN-GROUP printer-attributes-tag
-       EXPECT ?reference-uri-schemes-supported OF-TYPE uriScheme IN-GROUP printer-attributes-tag
-       EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT charset-supported OF-TYPE charset IN-GROUP printer-attributes-tag WITH-VALUE utf-8
-       EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE none
-       EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag
-       EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag
-       EXPECT ipp-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE 1.1
-       EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0002 # Print-Job
-       # Not requiring 0x0004 Validate-Job since it is deprecated
-       EXPECT operations-supported WITH-VALUE 0x0008 # Cancel-Job
-       EXPECT operations-supported WITH-VALUE 0x0009 # Get-Job-Attributes
-       EXPECT operations-supported WITH-VALUE 0x000A # Get-Jobs
-       EXPECT operations-supported WITH-VALUE 0x000B # Get-Printer-Attributes
-       EXPECT pdl-override-supported OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{1,127}$$/"
-       EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
-       EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag
-       EXPECT printer-up-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
-       EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported
-       EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT uri-authentication-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
-       EXPECT uri-security-supported OF-TYPE keyword IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-authentication-supported
+       EXPECT color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
+       EXPECT printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
+       EXPECT printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
+       EXPECT printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
 }
 
 
index d35eab0aa4bbad12a904d741976ceafa4c28ab5f..a3b94effdb5a575ebbfc1778ef2506c1745f6c1d 100644 (file)
@@ -14,7 +14,7 @@
 #
 # Usage:
 #
-#   ./ipptest -V 2.1 -f filename printer-uri ipp-2.0.test
+#   ./ipptool -V 2.1 -f filename -t printer-uri ipp-2.1.test
 #
 
 # Do all of the IPP/1.1 and IPP/2.0 tests as an IPP/2.1 client
@@ -37,66 +37,56 @@ INCLUDE "ipp-2.0.test"
        STATUS successful-ok
 
        # Job template attributes
-       EXPECT ?media-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?media-ready OF-TYPE keyword|name IN-GROUP printer-attributes-tag
-       EXPECT ?media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
-       EXPECT ?multiple-document-handling-default OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(single-document|separate-documents-uncollated-copies|separate-documents-collated-copies|single-document-new-sheet)$$/"
-       EXPECT ?multiple-document-handling-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(single-document|separate-documents-uncollated-copies|separate-documents-collated-copies|single-document-new-sheet)$$/"
-       EXPECT ?number-up-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
-       EXPECT ?number-up-supported OF-TYPE integer|rangeOfInteger IN-GROUP printer-attributes-tag WITH-VALUE >0
-       EXPECT ?number-up-supported WITH-VALUE 1
-       EXPECT ?orientation-requested-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6
-       EXPECT ?orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6
-       EXPECT ?pages-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag
-       EXPECT ?print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
-       EXPECT ?print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5
-       EXPECT ?printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
-       EXPECT ?sides-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
-       EXPECT ?sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
+       EXPECT job-hold-until-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT job-hold-until-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE no-hold
+       EXPECT job-priority-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0,<101
+       EXPECT job-priority-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0,<101
+       EXPECT job-settable-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
+       EXPECT job-sheets-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag
+       EXPECT job-sheets-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE none
+       EXPECT media-col-default OF-TYPE collection IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT media-col-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
+       EXPECT media-col-supported WITH-VALUE media-size
+       EXPECT media-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
+
+       # Subscription attributes
+       EXPECT notify-events-default OF-TYPE keyword IN-GROUP printer-attributes-tag
+       EXPECT notify-events-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
+       EXPECT notify-lease-duration-default OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT notify-lease-duration-supported OF-TYPE integer|rangeOfInteger IN-GROUP printer-attributes-tag
+       EXPECT notify-max-events-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >1
+       EXPECT notify-pull-method-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE ippget
 
        # Printer description attributes
-       EXPECT ?color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?job-impressions-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?job-k-octets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?job-media-sheets-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?multiple-document-jobs-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?multiple-operation-time-out OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
-       EXPECT ?pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-driver-installer OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
-       EXPECT ?printer-location OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
-       EXPECT ?printer-make-and-model OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
-       EXPECT ?printer-message-from-operator OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
-       EXPECT ?printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-more-info-manufacturer OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT ?printer-state-message OF-TYPE text IN-GROUP printer-attributes-tag
-       EXPECT ?reference-uri-schemes-supported OF-TYPE uriScheme IN-GROUP printer-attributes-tag
-       EXPECT charset-configured OF-TYPE charset IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT charset-supported OF-TYPE charset IN-GROUP printer-attributes-tag WITH-VALUE utf-8
-       EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE none
-       EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag
-       EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag
-       EXPECT ipp-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE 1.1
-       EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0002 # Print-Job
-       # Not requiring 0x0004 Validate-Job since it is deprecated
-       EXPECT operations-supported WITH-VALUE 0x0008 # Cancel-Job
-       EXPECT operations-supported WITH-VALUE 0x0009 # Get-Job-Attributes
-       EXPECT operations-supported WITH-VALUE 0x000A # Get-Jobs
-       EXPECT operations-supported WITH-VALUE 0x000B # Get-Printer-Attributes
-       EXPECT pdl-override-supported OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{1,127}$$/"
-       EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
+       EXPECT ippget-event-life OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
+       EXPECT multiple-operation-time-out OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
+
+       EXPECT operations-supported WITH-VALUE 0x0005 # Create-Job
+       EXPECT operations-supported WITH-VALUE 0x0006 # Send-Document
+       EXPECT operations-supported WITH-VALUE 0x000C # Hold-Job
+       EXPECT operations-supported WITH-VALUE 0x000D # Release-Job
+       EXPECT operations-supported WITH-VALUE 0x000E # Restart-Job
+       EXPECT operations-supported WITH-VALUE 0x0010 # Pause-Printer
+       EXPECT operations-supported WITH-VALUE 0x0011 # Resume-Printer
+       EXPECT operations-supported WITH-VALUE 0x0012 # Purge-Jobs
+       EXPECT operations-supported WITH-VALUE 0x0013 # Set-Printer-Attributes
+       EXPECT operations-supported WITH-VALUE 0x0014 # Set-Job-Attributes
+       EXPECT operations-supported WITH-VALUE 0x0015 # Get-Printer-Supported-Values
+       EXPECT operations-supported WITH-VALUE 0x0016 # Create-Printer-Subscriptions
+       EXPECT operations-supported WITH-VALUE 0x0018 # Get-Subscription-Attributes
+       EXPECT operations-supported WITH-VALUE 0x0019 # Get-Subscriptions
+       EXPECT operations-supported WITH-VALUE 0x001A # Renew-Subscription
+       EXPECT operations-supported WITH-VALUE 0x001B # Cancel-Subscription
+       EXPECT operations-supported WITH-VALUE 0x001C # Get-Notifications
+       EXPECT operations-supported WITH-VALUE 0x0022 # Enable-Printer
+       EXPECT operations-supported WITH-VALUE 0x0023 # Disable-Printer
+
+       ?EXPECT printer-alert OF-TYPE octetString IN-GROUP printer-attributes-tag
+       ?EXPECT printer-alert-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-alert
+       EXPECT printer-settable-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
+       EXPECT printer-state-change-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
        EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag
-       EXPECT printer-up-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
-       EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported
-       EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
-       EXPECT uri-authentication-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
-       EXPECT uri-security-supported OF-TYPE keyword IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-authentication-supported
 }
 
 
similarity index 89%
rename from test/ipptest.c
rename to test/ipptool.c
index 118687bd2524e33d665ff8b945f87feb1993292b..6d56f1c54f95b9d5ac17042fa5687085e788cc6b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "$Id$"
  *
- *   IPP test command for CUPS.
+ *   ipptool command for CUPS.
  *
  *   Copyright 2007-2010 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
@@ -27,7 +27,9 @@
  *                         dateTime value.
  *   print_attr()        - Print an attribute on the screen.
  *   print_col()         - Print a collection attribute on the screen.
+ *   print_csv()         - Print a line of CSV text.
  *   print_fatal_error() - Print a fatal error message.
+ *   print_line()        - Print a line of formatted text.
  *   print_test_error()  - Print a test error message.
  *   print_xml_header()  - Print a standard XML plist header.
  *   print_xml_string()  - Print an XML string with escaping.
  * Types...
  */
 
-typedef enum                           /**** How to send request data ****/
+typedef enum _cups_transfer_e          /**** How to send request data ****/
 {
   _CUPS_TRANSFER_AUTO,                 /* Chunk for files, length for static */
   _CUPS_TRANSFER_CHUNKED,              /* Chunk always */
   _CUPS_TRANSFER_LENGTH                        /* Length always */
 } _cups_transfer_t;
 
+typedef enum _cups_output_e            /**** Output mode ****/
+{
+  _CUPS_OUTPUT_QUIET,                  /* No output */
+  _CUPS_OUTPUT_TEST,                   /* Traditional CUPS test output */
+  _CUPS_OUTPUT_PLIST,                  /* XML plist test output */
+  _CUPS_OUTPUT_LIST,                   /* Tabular list output */
+  _CUPS_OUTPUT_CSV                     /* Comma-separated values output */
+} _cups_output_t;
+
 typedef struct _cups_expect_s          /**** Expected attribute info ****/
 {
   int          optional,               /* Optional attribute? */
@@ -110,9 +121,10 @@ typedef struct _cups_vars_s                /**** Set of variables ****/
 
 _cups_transfer_t Transfer = _CUPS_TRANSFER_AUTO;
                                        /* How to transfer requests */
+_cups_output_t Output = _CUPS_OUTPUT_LIST;
+                                       /* Output mode */
 int            Verbosity = 0,          /* Show all attributes? */
                Version = 11,           /* Default IPP version */
-               XML = 0,                /* Produce XML output? */
                XMLHeader = 0;          /* 1 if header is written */
 const char * const URIStatusStrings[] =        /* URI status strings */
 {
@@ -153,11 +165,15 @@ static char       *get_variable(_cups_vars_t *vars, const char *name);
 static char    *iso_date(ipp_uchar_t *date);
 static void    print_attr(ipp_attribute_t *attr);
 static void    print_col(ipp_t *col);
+static void    print_csv(ipp_attribute_t *attr, int num_displayed,
+                         char **displayed, size_t *widths);
 static void    print_fatal_error(const char *s, ...)
 #ifdef __GNUC__
 __attribute__ ((__format__ (__printf__, 1, 2)))
 #endif /* __GNUC__ */
 ;
+static void    print_line(ipp_attribute_t *attr, int num_displayed,
+                          char **displayed, size_t *widths);
 static void    print_test_error(const char *s, ...)
 #ifdef __GNUC__
 __attribute__ ((__format__ (__printf__, 1, 2)))
@@ -185,11 +201,17 @@ main(int  argc,                           /* I - Number of command-line args */
   int                  status;         /* Status of tests... */
   char                 *opt,           /* Current option */
                        name[1024],     /* Name/value buffer */
-                       *value;         /* Pointer to value */
+                       *value,         /* Pointer to value */
+                       filename[1024], /* Real filename */
+                       testname[1024]; /* Real test filename */
   const char           *testfile;      /* Test file to use */
-  int                  interval;       /* Test interval */
+  int                  interval,       /* Test interval */
+                       repeat;         /* Repeat count */
   _cups_vars_t         vars;           /* Variables */
   http_uri_status_t    uri_status;     /* URI separation status */
+  _cups_globals_t      *cg = _cupsGlobals();
+                                       /* Global data */
+
 
 
  /*
@@ -204,12 +226,13 @@ main(int  argc,                           /* I - Number of command-line args */
  /*
   * We need at least:
   *
-  *     ipptest URI testfile
+  *     ipptool URI testfile
   */
 
-  testfile = NULL;
-  status   = 0;
   interval = 0;
+  repeat   = 0;
+  status   = 0;
+  testfile = NULL;
 
   for (i = 1; i < argc; i ++)
   {
@@ -219,7 +242,11 @@ main(int  argc,                            /* I - Number of command-line args */
       {
         switch (*opt)
         {
-         case 'E' : /* Encrypt */
+          case 'C' : /* Enable HTTP chunking */
+              Transfer = _CUPS_TRANSFER_CHUNKED;
+              break;
+
+         case 'E' : /* Encrypt with TLS */
 #ifdef HAVE_SSL
              vars.encryption = HTTP_ENCRYPT_REQUIRED;
 #else
@@ -229,13 +256,27 @@ main(int  argc,                           /* I - Number of command-line args */
 #endif /* HAVE_SSL */
              break;
 
+          case 'L' : /* Disable HTTP chunking */
+              Transfer = _CUPS_TRANSFER_LENGTH;
+              break;
+
+         case 'S' : /* Encrypt with SSL */
+#ifdef HAVE_SSL
+             vars.encryption = HTTP_ENCRYPT_ALWAYS;
+#else
+             _cupsLangPrintf(stderr,
+                             _("%s: Sorry, no encryption support compiled in\n"),
+                             argv[0]);
+#endif /* HAVE_SSL */
+             break;
+
          case 'V' : /* Set IPP version */
              i ++;
 
              if (i >= argc)
              {
                _cupsLangPuts(stderr,
-                             _("ipptest: Missing version for \"-V\".\n"));
+                             _("ipptool: Missing version for \"-V\".\n"));
                usage();
               }
 
@@ -252,25 +293,25 @@ main(int  argc,                           /* I - Number of command-line args */
              else
              {
                _cupsLangPrintf(stderr,
-                               _("ipptest: Bad version %s for \"-V\".\n"),
+                               _("ipptool: Bad version %s for \"-V\".\n"),
                                argv[i]);
                usage();
              }
              break;
 
           case 'X' : /* Produce XML output */
-             XML = 1;
+             Output = _CUPS_OUTPUT_PLIST;
 
-              if (interval)
+              if (interval || repeat)
              {
-               _cupsLangPuts(stderr, _("ipptest: \"-i\" is incompatible with "
-                                       "\"-x\".\n"));
+               _cupsLangPuts(stderr, _("ipptool: \"-i\" and \"-n\" are "
+                                       "incompatible with -X\".\n"));
                usage();
              }
              break;
 
-          case 'c' : /* Enable HTTP chunking */
-              Transfer = _CUPS_TRANSFER_CHUNKED;
+          case 'c' : /* CSV output */
+              Output = _CUPS_OUTPUT_CSV;
               break;
 
           case 'd' : /* Define a variable */
@@ -279,7 +320,7 @@ main(int  argc,                             /* I - Number of command-line args */
              if (i >= argc)
              {
                _cupsLangPuts(stderr,
-                             _("ipptest: Missing name=value for \"-d\".\n"));
+                             _("ipptool: Missing name=value for \"-d\".\n"));
                usage();
               }
 
@@ -298,35 +339,73 @@ main(int  argc,                           /* I - Number of command-line args */
              if (i >= argc)
              {
                _cupsLangPuts(stderr,
-                             _("ipptest: Missing filename for \"-f\".\n"));
+                             _("ipptool: Missing filename for \"-f\".\n"));
                usage();
               }
 
-             vars.filename = argv[i];
+              if (access(argv[i], 0) && argv[i][0] != '/')
+              {
+                snprintf(filename, sizeof(filename), "%s/ipptool/%s",
+                         cg->cups_datadir, argv[i]);
+                if (access(argv[i], 0))
+                 vars.filename = argv[i];
+                else
+                  vars.filename = filename;
+              }
+              else
+               vars.filename = argv[i];
              break;
 
           case 'i' : /* Test every N seconds */
-             i++;
+             i ++;
 
              if (i >= argc)
              {
                _cupsLangPuts(stderr,
-                             _("ipptest: Missing seconds for \"-i\".\n"));
+                             _("ipptool: Missing seconds for \"-i\".\n"));
                usage();
               }
              else
                interval = atoi(argv[i]);
 
-              if (XML && interval)
+              if (Output == _CUPS_OUTPUT_PLIST && interval)
              {
-               _cupsLangPuts(stderr, _("ipptest: \"-i\" is incompatible with "
-                                       "\"-x\".\n"));
+               _cupsLangPuts(stderr, _("ipptool: \"-i\" is incompatible with "
+                                       "\"-X\".\n"));
                usage();
              }
              break;
 
-          case 'l' : /* Disable HTTP chunking */
-              Transfer = _CUPS_TRANSFER_LENGTH;
+          case 'l' : /* List as a table */
+              Output = _CUPS_OUTPUT_LIST;
+              break;
+
+          case 'n' : /* Repeat count */
+              i ++;
+
+             if (i >= argc)
+             {
+               _cupsLangPuts(stderr,
+                             _("ipptool: Missing count for \"-n\".\n"));
+               usage();
+              }
+             else
+               repeat = atoi(argv[i]);
+
+              if (Output == _CUPS_OUTPUT_PLIST && repeat)
+             {
+               _cupsLangPuts(stderr, _("ipptool: \"-n\" is incompatible with "
+                                       "\"-X\".\n"));
+               usage();
+             }
+             break;
+
+          case 'q' : /* Be quiet */
+              Output = _CUPS_OUTPUT_QUIET;
+              break;
+
+          case 't' : /* CUPS test output */
+              Output = _CUPS_OUTPUT_TEST;
               break;
 
           case 'v' : /* Be verbose */
@@ -334,7 +413,7 @@ main(int  argc,                             /* I - Number of command-line args */
              break;
 
          default :
-             _cupsLangPrintf(stderr, _("ipptest: Unknown option \"-%c\".\n"),
+             _cupsLangPrintf(stderr, _("ipptool: Unknown option \"-%c\".\n"),
                              *opt);
              usage();
              break;
@@ -351,7 +430,7 @@ main(int  argc,                             /* I - Number of command-line args */
 
       if (vars.uri)
       {
-        _cupsLangPuts(stderr, _("ipptest: May only specify a single URI.\n"));
+        _cupsLangPuts(stderr, _("ipptool: May only specify a single URI.\n"));
         usage();
       }
 
@@ -365,7 +444,7 @@ main(int  argc,                             /* I - Number of command-line args */
 
       if (uri_status != HTTP_URI_OK)
       {
-        _cupsLangPrintf(stderr, _("ipptest: Bad URI - %s.\n"),
+        _cupsLangPrintf(stderr, _("ipptool: Bad URI - %s.\n"),
                        URIStatusStrings[uri_status - HTTP_URI_OVERFLOW]);
         return (1);
       }
@@ -373,7 +452,7 @@ main(int  argc,                             /* I - Number of command-line args */
       if (strcmp(vars.scheme, "http") && strcmp(vars.scheme, "https") &&
           strcmp(vars.scheme, "ipp"))
       {
-        _cupsLangPuts(stderr, _("ipptest: Only http, https, and ipp URIs are "
+        _cupsLangPuts(stderr, _("ipptool: Only http, https, and ipp URIs are "
                                "supported."));
        return (1);
       }
@@ -386,11 +465,21 @@ main(int  argc,                           /* I - Number of command-line args */
 
       if (!vars.uri)
       {
-        _cupsLangPuts(stderr, _("ipptest: URI required before test file."));
+        _cupsLangPuts(stderr, _("ipptool: URI required before test file."));
        usage();
       }
 
-      testfile = argv[i];
+      if (access(argv[i], 0) && argv[i][0] != '/')
+      {
+        snprintf(testname, sizeof(testname), "%s/ipptool/%s", cg->cups_datadir,
+                 argv[i]);
+        if (access(testname, 0))
+          testfile = argv[i];
+        else
+          testfile = testname;
+      }
+      else
+        testfile = argv[i];
 
       if (!do_tests(&vars, testfile))
         status = 1;
@@ -404,8 +493,17 @@ main(int  argc,                            /* I - Number of command-line args */
   * Loop if the interval is set...
   */
 
-  if (XML)
+  if (Output == _CUPS_OUTPUT_PLIST)
     print_xml_trailer(!status, NULL);
+  else if (interval && repeat > 0)
+  {
+    while (repeat > 1)
+    {
+      sleep(interval);
+      do_tests(&vars, testfile);
+      repeat --;
+    }
+  }
   else if (interval)
   {
     for (;;)
@@ -474,7 +572,8 @@ do_tests(_cups_vars_t *vars,                /* I - Variables */
                *expect,                /* Current expected attribute */
                *last_expect;           /* Last EXPECT (for predicates) */
   int          num_displayed = 0;      /* Number of displayed attributes */
-  char         *displayed[100];        /* Displayed attributes */
+  char         *displayed[200];        /* Displayed attributes */
+  size_t       widths[200];            /* Width of columns */
 
 
  /*
@@ -504,9 +603,9 @@ do_tests(_cups_vars_t *vars,                /* I - Variables */
   * Loop on tests...
   */
 
-  if (XML)
+  if (Output == _CUPS_OUTPUT_PLIST)
     print_xml_header();
-  else
+  else if (Output == _CUPS_OUTPUT_TEST)
     printf("\"%s\":\n", testfile);
 
   CUPS_SRAND(time(NULL));
@@ -1349,7 +1448,7 @@ do_tests(_cups_vars_t *vars,              /* I - Variables */
     request->request.op.operation_id = op;
     request->request.op.request_id   = request_id;
 
-    if (XML)
+    if (Output == _CUPS_OUTPUT_PLIST)
     {
       puts("<dict>");
       puts("<key>Name</key>");
@@ -1362,7 +1461,7 @@ do_tests(_cups_vars_t *vars,              /* I - Variables */
        print_attr(attrptr);
       puts("</dict>");
     }
-    else
+    else if (Output == _CUPS_OUTPUT_TEST)
     {
       if (Verbosity)
       {
@@ -1571,7 +1670,7 @@ do_tests(_cups_vars_t *vars,              /* I - Variables */
       }
     }
 
-    if (XML)
+    if (Output == _CUPS_OUTPUT_PLIST)
     {
       puts("<key>Successful</key>");
       puts(pass ? "<true />" : "<false />");
@@ -1585,7 +1684,7 @@ do_tests(_cups_vars_t *vars,              /* I - Variables */
        print_attr(attrptr);
       puts("</dict>");
     }
-    else
+    else if (Output == _CUPS_OUTPUT_TEST)
     {
       puts(pass ? "PASS]" : "FAIL]");
 
@@ -1604,23 +1703,79 @@ do_tests(_cups_vars_t *vars,            /* I - Variables */
        }
       }
     }
+    else if (!pass)
+      fprintf(stderr, "%s\n", cupsLastErrorString());
 
-    if (pass && !XML && !Verbosity && num_displayed > 0)
+    if (pass && Output != _CUPS_OUTPUT_PLIST && Output != _CUPS_OUTPUT_QUIET &&
+        !Verbosity && num_displayed > 0)
     {
-      for (attrptr = response->attrs;
-          attrptr != NULL;
-          attrptr = attrptr->next)
-       if (attrptr->name)
-         for (i = 0; i < num_displayed; i ++)
-           if (!strcmp(displayed[i], attrptr->name))
+      if (Output >= _CUPS_OUTPUT_LIST)
+      {
+       size_t  width;                  /* Length of value */
+
+
+        for (i = 0; i < num_displayed; i ++)
+        {
+          widths[i] = strlen(displayed[i]);
+
+          for (attrptr = ippFindAttribute(response, displayed[i], IPP_TAG_ZERO);
+               attrptr;
+               attrptr = ippFindNextAttribute(response, displayed[i],
+                                              IPP_TAG_ZERO))
+          {
+            width = _ippAttrString(attrptr, NULL, 0);
+            if (width > widths[i])
+              widths[i] = width;
+          }
+        }
+
+        if (Output == _CUPS_OUTPUT_CSV)
+         print_csv(NULL, num_displayed, displayed, widths);
+       else
+         print_line(NULL, num_displayed, displayed, widths);
+
+        attrptr = response->attrs;
+
+        while (attrptr)
+        {
+         while (attrptr && attrptr->group_tag <= IPP_TAG_OPERATION)
+           attrptr = attrptr->next;
+
+          if (attrptr)
+          {
+            if (Output == _CUPS_OUTPUT_CSV)
+             print_csv(attrptr, num_displayed, displayed, widths);
+           else
+             print_line(attrptr, num_displayed, displayed, widths);
+
+            while (attrptr && attrptr->group_tag > IPP_TAG_OPERATION)
+              attrptr = attrptr->next;
+          }
+        }
+      }
+      else
+      {
+       for (attrptr = response->attrs;
+            attrptr != NULL;
+            attrptr = attrptr->next)
+       {
+         if (attrptr->name)
+         {
+           for (i = 0; i < num_displayed; i ++)
            {
-             print_attr(attrptr);
-             break;
+             if (!strcmp(displayed[i], attrptr->name))
+             {
+               print_attr(attrptr);
+               break;
+             }
            }
+         }
+       }
+      }
     }
     else if (!pass)
     {
-      if (XML)
+      if (Output == _CUPS_OUTPUT_PLIST)
       {
        puts("<key>Errors</key>");
        puts("<array>");
@@ -1829,11 +1984,11 @@ do_tests(_cups_vars_t *vars,            /* I - Variables */
        }
       }
 
-      if (XML)
+      if (Output == _CUPS_OUTPUT_PLIST)
        puts("</array>");
     }
 
-    if (XML)
+    if (Output == _CUPS_OUTPUT_PLIST)
       puts("</dict>");
 
     ippDelete(response);
@@ -2338,10 +2493,10 @@ get_filename(const char *testfile,      /* I - Current test file */
   if (*src == '<' && src[strlen(src) - 1] == '>')
   {
    /*
-    * Map <filename> to CUPS_DATADIR/ipptest/filename...
+    * Map <filename> to CUPS_DATADIR/ipptool/filename...
     */
 
-    snprintf(dst, dstsize, "%s/ipptest/%s", cg->cups_datadir, src + 1);
+    snprintf(dst, dstsize, "%s/ipptool/%s", cg->cups_datadir, src + 1);
     dstptr = dst + strlen(dst) - 1;
     if (*dstptr == '>')
       *dstptr = '\0';
@@ -2538,7 +2693,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
   ipp_attribute_t      *colattr;       /* Collection attribute */
 
 
-  if (XML)
+  if (Output == _CUPS_OUTPUT_PLIST)
   {
     if (!attr->name)
     {
@@ -2550,7 +2705,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
     if (attr->num_values > 1)
       puts("<array>");
   }
-  else
+  else if (Output == _CUPS_OUTPUT_TEST)
   {
     if (!attr->name)
     {
@@ -2568,7 +2723,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
     case IPP_TAG_INTEGER :
     case IPP_TAG_ENUM :
        for (i = 0; i < attr->num_values; i ++)
-         if (XML)
+         if (Output == _CUPS_OUTPUT_PLIST)
            printf("<integer>%d</integer>\n", attr->values[i].integer);
          else
            printf("%d ", attr->values[i].integer);
@@ -2576,7 +2731,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
 
     case IPP_TAG_BOOLEAN :
        for (i = 0; i < attr->num_values; i ++)
-         if (XML)
+         if (Output == _CUPS_OUTPUT_PLIST)
            puts(attr->values[i].boolean ? "<true />" : "<false />");
          else if (attr->values[i].boolean)
            fputs("true ", stdout);
@@ -2586,7 +2741,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
 
     case IPP_TAG_RANGE :
        for (i = 0; i < attr->num_values; i ++)
-         if (XML)
+         if (Output == _CUPS_OUTPUT_PLIST)
            printf("<dict><key>lower</key><integer>%d</integer>"
                   "<key>upper</key><integer>%d</integer></dict>\n",
                   attr->values[i].range.lower, attr->values[i].range.upper);
@@ -2597,7 +2752,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
 
     case IPP_TAG_RESOLUTION :
        for (i = 0; i < attr->num_values; i ++)
-         if (XML)
+         if (Output == _CUPS_OUTPUT_PLIST)
            printf("<dict><key>xres</key><integer>%d</integer>"
                   "<key>yres</key><integer>%d</integer>"
                   "<key>units</key><string>%s</string></dict>\n",
@@ -2614,7 +2769,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
 
     case IPP_TAG_DATE :
        for (i = 0; i < attr->num_values; i ++)
-         if (XML)
+         if (Output == _CUPS_OUTPUT_PLIST)
             printf("<date>%s</date>\n", iso_date(attr->values[i].date));
           else
            printf("%s ", iso_date(attr->values[i].date));
@@ -2629,7 +2784,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
     case IPP_TAG_MIMETYPE :
     case IPP_TAG_LANGUAGE :
        for (i = 0; i < attr->num_values; i ++)
-         if (XML)
+         if (Output == _CUPS_OUTPUT_PLIST)
            print_xml_string("string", attr->values[i].string.text);
          else
            printf("\"%s\" ", attr->values[i].string.text);
@@ -2638,7 +2793,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
     case IPP_TAG_TEXTLANG :
     case IPP_TAG_NAMELANG :
        for (i = 0; i < attr->num_values; i ++)
-         if (XML)
+         if (Output == _CUPS_OUTPUT_PLIST)
          {
            fputs("<dict><key>language</key><string>", stdout);
            print_xml_string(NULL, attr->values[i].string.charset);
@@ -2654,7 +2809,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
     case IPP_TAG_BEGIN_COLLECTION :
        for (i = 0; i < attr->num_values; i ++)
        {
-         if (XML)
+         if (Output == _CUPS_OUTPUT_PLIST)
          {
            puts("<dict>");
            for (colattr = attr->values[i].collection->attrs;
@@ -2674,7 +2829,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
        break;
 
     default :
-       if (XML)
+       if (Output == _CUPS_OUTPUT_PLIST)
          printf("<string>&lt;&lt;%s&gt;&gt;</string>\n",
                 ippTagString(attr->value_tag));
        else
@@ -2682,7 +2837,7 @@ print_attr(ipp_attribute_t *attr) /* I - Attribute to print */
        break;
   }
 
-  if (XML)
+  if (Output == _CUPS_OUTPUT_PLIST)
   {
     if (attr->num_values > 1)
       puts("</array>");
@@ -2779,6 +2934,94 @@ print_col(ipp_t *col)                    /* I - Collection attribute to print */
 }
 
 
+/*
+ * 'print_csv()' - Print a line of CSV text.
+ */
+
+static void
+print_csv(
+    ipp_attribute_t *attr,             /* I - First attribute for line */
+    int             num_displayed,     /* I - Number of attributes to display */
+    char            **displayed,       /* I - Attributes to display */
+    size_t          *widths)           /* I - Column widths */
+{
+  int          i;                      /* Looping var */
+  size_t       maxlength;              /* Max length of all columns */
+  char         *buffer,                /* String buffer */
+               *bufptr;                /* Pointer into buffer */
+  ipp_attribute_t *current;            /* Current attribute */
+
+
+ /*
+  * Get the maximum string length we have to show and allocate...
+  */
+
+  for (i = 1, maxlength = widths[0]; i < num_displayed; i ++)
+    if (widths[i] > maxlength)
+      maxlength = widths[i];
+
+  maxlength += 2;
+
+  if ((buffer = malloc(maxlength)) == NULL)
+    return;
+
+ /*
+  * Loop through the attributes to display...
+  */
+
+  if (attr)
+  {
+    for (i = 0; i < num_displayed; i ++)
+    {
+      if (i)
+        putchar(',');
+
+      buffer[0] = '\0';
+
+      for (current = attr; current; current = current->next)
+      {
+        if (!current->name)
+          break;
+        else if (!strcmp(current->name, displayed[i]))
+        {
+          _ippAttrString(current, buffer, maxlength);
+          break;
+        }
+      }
+
+      if (strchr(buffer, ',') != NULL || strchr(buffer, '\"') != NULL ||
+         strchr(buffer, '\\') != NULL)
+      {
+        putchar('\"');
+        for (bufptr = buffer; *bufptr; bufptr ++)
+        {
+          if (*bufptr == '\\' || *bufptr == '\"')
+            putchar('\\');
+          putchar(*bufptr);
+        }
+        putchar('\"');
+      }
+      else
+        fputs(buffer, stdout);
+    }
+    putchar('\n');
+  }
+  else
+  {
+    for (i = 0; i < num_displayed; i ++)
+    {
+      if (i)
+        putchar(',');
+
+      fputs(displayed[i], stdout);
+    }
+    putchar('\n');
+  }
+
+  free(buffer);
+}
+
+
 /*
  * 'print_fatal_error()' - Print a fatal error message.
  */
@@ -2803,13 +3046,98 @@ print_fatal_error(const char *s,        /* I - Printf-style format string */
   * Then output it...
   */
 
-  if (XML)
+  if (Output == _CUPS_OUTPUT_PLIST)
   {
     print_xml_header();
     print_xml_trailer(0, buffer);
   }
   else
-    _cupsLangPrintf(stderr, "ipptest: %s\n", buffer);
+    _cupsLangPrintf(stderr, "ipptool: %s\n", buffer);
+}
+
+
+/*
+ * 'print_line()' - Print a line of formatted or CSV text.
+ */
+
+static void
+print_line(
+    ipp_attribute_t *attr,             /* I - First attribute for line */
+    int             num_displayed,     /* I - Number of attributes to display */
+    char            **displayed,       /* I - Attributes to display */
+    size_t          *widths)           /* I - Column widths */
+{
+  int          i;                      /* Looping var */
+  size_t       maxlength;              /* Max length of all columns */
+  char         *buffer;                /* String buffer */
+  ipp_attribute_t *current;            /* Current attribute */
+
+
+ /*
+  * Get the maximum string length we have to show and allocate...
+  */
+
+  for (i = 1, maxlength = widths[0]; i < num_displayed; i ++)
+    if (widths[i] > maxlength)
+      maxlength = widths[i];
+
+  maxlength += 2;
+
+  if ((buffer = malloc(maxlength)) == NULL)
+    return;
+
+ /*
+  * Loop through the attributes to display...
+  */
+
+  if (attr)
+  {
+    for (i = 0; i < num_displayed; i ++)
+    {
+      if (i)
+        putchar(' ');
+
+      buffer[0] = '\0';
+
+      for (current = attr; current; current = current->next)
+      {
+        if (!current->name)
+          break;
+        else if (!strcmp(current->name, displayed[i]))
+        {
+          _ippAttrString(current, buffer, maxlength);
+          break;
+        }
+      }
+
+      printf("%*s", (int)-widths[i], buffer);
+    }
+    putchar('\n');
+  }
+  else
+  {
+    for (i = 0; i < num_displayed; i ++)
+    {
+      if (i)
+        putchar(' ');
+
+      printf("%*s", (int)-widths[i], displayed[i]);
+    }
+    putchar('\n');
+
+    for (i = 0; i < num_displayed; i ++)
+    {
+      if (i)
+       putchar(' ');
+
+      memset(buffer, '-', widths[i]);
+      buffer[widths[i]] = '\0';
+      fputs(buffer, stdout);
+    }
+    putchar('\n');
+  }
+
+  free(buffer);
 }
 
 
@@ -2837,7 +3165,7 @@ print_test_error(const char *s,           /* I - Printf-style format string */
   * Then output it...
   */
 
-  if (XML)
+  if (Output == _CUPS_OUTPUT_PLIST)
     print_xml_string("string", buffer);
   else
     printf("        %s\n", buffer);
@@ -2968,20 +3296,25 @@ static void
 usage(void)
 {
   _cupsLangPuts(stderr,
-                _("Usage: ipptest [options] URI filename.test [ ... "
-                 "filenameN.test ]\n"
+                _("Usage: ipptool [options] URI filename [ ... "
+                 "filenameN ]\n"
                  "\n"
                  "Options:\n"
                  "\n"
-                 "-E             Test with encryption.\n"
+                 "-C             Send requests using chunking (default)\n"
+                 "-E             Test with TLS encryption.\n"
+                 "-L             Send requests using content-length\n"
+                 "-S             Test with SSL encryption.\n"
                  "-V version     Set default IPP version.\n"
-                 "-X             Produce XML instead of plain text.\n"
-                 "-c             Send requests using chunking (default)\n"
+                 "-X             Produce XML plist instead of plain text.\n"
                  "-d name=value  Define variable.\n"
-                 "-f filename    Set default test file.\n"
-                 "-i seconds     Repeat the last test file with the given "
+                 "-f filename    Set default request filename.\n"
+                 "-i seconds     Repeat the last file with the given time "
                  "interval.\n"
-                 "-l             Send requests using content-length\n"
+                 "-n count       Repeat the last file the given number of "
+                 "times.\n"
+                 "-q             Be quiet - no output except errors.\n"
+                 "-t             Produce a test report.\n"
                  "-v             Show all attributes sent and received.\n"));
 
   exit(1);
index e1ea59b62dbc8fe4c2e83cc90cce5706f8568fb5..39e9be5c9564e00f652778d088ccc9f2d4a888c0 100755 (executable)
@@ -5,7 +5,7 @@
 #   Perform the complete set of IPP compliance tests specified in the
 #   CUPS Software Test Plan.
 #
-#   Copyright 2007-2009 by Apple Inc.
+#   Copyright 2007-2010 by Apple Inc.
 #   Copyright 1997-2007 by Easy Software Products, all rights reserved.
 #
 #   These coded instructions, statements, and computer programs are the
@@ -552,7 +552,7 @@ for file in 4*.test; do
        echo "Performing $file..."
        echo "" >>$strfile
 
-       ./ipptest ipp://localhost:$port/printers $file | tee -a $strfile
+       ./ipptool -t ipp://localhost:$port/printers $file | tee -a $strfile
        status=$?
 
        if test $status != 0; then
similarity index 93%
rename from vc2005/ipptest.vcproj
rename to vc2005/ipptool.vcproj
index d01d7effc985c066e898643327ee31f208c7b7e6..271187b54291f1ecc892d77e8a29c4885ae3168c 100644 (file)
@@ -4,7 +4,7 @@
        Version="8.00"\r
        Name="cupstestppd"\r
        ProjectGUID="{B246D91E-61F2-4433-BFD2-6C2A96FBD4D4}"\r
-       RootNamespace="ipptest"\r
+       RootNamespace="ipptool"\r
        Keyword="Win32Proj"\r
        >\r
        <Platforms>\r
                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
                        <File\r
-                               RelativePath="..\test\ipptest.c"\r
+                               RelativePath="..\test\ipptool.c"\r
                                >\r
                        </File>\r
                </Filter>\r
index 0e950a33b064a258fc583591d5e94c77381ea5df..5c318adb68a57144b5a91e59eeb719845a59cc2f 100644 (file)
@@ -17,7 +17,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cupstestppd", "cupstestppd.
                {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3} = {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}\r
        EndProjectSection\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipptest", "ipptest.vcproj", "{B246D91E-61F2-4433-BFD2-6C2A96FBD4D4}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipptool", "ipptool.vcproj", "{B246D91E-61F2-4433-BFD2-6C2A96FBD4D4}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3} = {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}\r
        EndProjectSection\r
similarity index 93%
rename from vcnet/ipptest.vcproj
rename to vcnet/ipptool.vcproj
index 9de93f372e6acf9a899c7fde73e64f154408e25f..8f3f11b7a8603cf1f718f85510d0f4fb23e2f2e6 100644 (file)
@@ -2,9 +2,9 @@
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
        Version="9.00"\r
-       Name="ipptest"\r
+       Name="ipptool"\r
        ProjectGUID="{B246D91E-61F2-4433-BFD2-6C2A96FBD4D4}"\r
-       RootNamespace="ipptest"\r
+       RootNamespace="ipptool"\r
        Keyword="Win32Proj"\r
        TargetFrameworkVersion="131072"\r
        >\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\test\ipptest.c"\r
+                               RelativePath="..\test\ipptool.c"\r
                                >\r
                        </File>\r
                        <File\r