-CHANGES.txt - 2.1.3 - 2016-02-05
+CHANGES.txt - 2.1.4 - 2016-02-12
--------------------------------
+CHANGES IN CUPS V2.1.4
+
+ - Documentation update (STR #4772)
+
+
CHANGES IN CUPS V2.1.3
- The default password function did not work on some platforms
AC_CONFIG_HEADER(config.h)
dnl Version number information...
-CUPS_VERSION=2.1.3
+CUPS_VERSION="AC_PACKAGE_VERSION"
case "$CUPS_VERSION" in
*svn)
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for CUPS 2.1.3.
+# Generated by GNU Autoconf 2.68 for CUPS 2.1.4.
#
# Report bugs to <https://www.cups.org/str.php>.
#
# Identity of this package.
PACKAGE_NAME='CUPS'
PACKAGE_TARNAME='cups'
-PACKAGE_VERSION='2.1.3'
-PACKAGE_STRING='CUPS 2.1.3'
+PACKAGE_VERSION='2.1.4'
+PACKAGE_STRING='CUPS 2.1.4'
PACKAGE_BUGREPORT='https://www.cups.org/str.php'
PACKAGE_URL='https://www.cups.org/'
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures CUPS 2.1.3 to adapt to many kinds of systems.
+\`configure' configures CUPS 2.1.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of CUPS 2.1.3:";;
+ short | recursive ) echo "Configuration of CUPS 2.1.4:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-CUPS configure 2.1.3
+CUPS configure 2.1.4
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by CUPS $as_me 2.1.3, which was
+It was created by CUPS $as_me 2.1.4, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
ac_config_headers="$ac_config_headers config.h"
-CUPS_VERSION=2.1.3
+CUPS_VERSION="2.1.4"
case "$CUPS_VERSION" in
*svn)
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by CUPS $as_me 2.1.3, which was
+This file was extended by CUPS $as_me 2.1.4, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-CUPS config.status 2.1.3
+CUPS config.status 2.1.4
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
dnl
-dnl "$Id: configure.ac 13031 2016-01-04 14:43:04Z msweet $"
+dnl "$Id: configure.ac 13087 2016-02-12 18:53:24Z msweet $"
dnl
dnl Configuration script for CUPS.
dnl
AC_PREREQ(2.60)
dnl Package name and version...
-AC_INIT([CUPS], [2.1.3], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
+AC_INIT([CUPS], [2.1.4], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
sinclude(config-scripts/cups-opsys.m4)
sinclude(config-scripts/cups-common.m4)
chmod +x cups-config
dnl
-dnl End of "$Id: configure.ac 13031 2016-01-04 14:43:04Z msweet $".
+dnl End of "$Id: configure.ac 13087 2016-02-12 18:53:24Z msweet $".
dnl
/*
- * "$Id: cups.h 13031 2016-01-04 14:43:04Z msweet $"
+ * "$Id: cups.h 13087 2016-02-12 18:53:24Z msweet $"
*
* API definitions for CUPS.
*
* Constants...
*/
-# define CUPS_VERSION 2.0103
+# define CUPS_VERSION 2.0104
# define CUPS_VERSION_MAJOR 2
# define CUPS_VERSION_MINOR 1
-# define CUPS_VERSION_PATCH 3
+# define CUPS_VERSION_PATCH 4
# define CUPS_BC_FD 3
/* Back-channel file descriptor for
#endif /* !_CUPS_CUPS_H_ */
/*
- * End of "$Id: cups.h 13031 2016-01-04 14:43:04Z msweet $".
+ * End of "$Id: cups.h 13087 2016-02-12 18:53:24Z msweet $".
*/
<b>cupsd</b>
[
<b>-c</b>
-<i>config-file</i>
+<i>cupsd.conf</i>
] [
<b>-f</b>
] [
] [
<b>-l</b>
] [
+<b>-s</b>
+<i>cups-files.conf</i>
+] [
<b>-t</b>
]
<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
<b>cupsd</b>
-is the scheduler for CUPS. It implements a printing system based upon the Internet Printing Protocol, version 2.1. If no options are specified on the command-line then the default configuration file
+is the scheduler for CUPS. It implements a printing system based upon the Internet Printing Protocol, version 2.1, and supports most of the requirements for IPP Everywhere. If no options are specified on the command-line then the default configuration file
<i>/etc/cups/cupsd.conf</i>
will be used.
<h2 class="title"><a name="OPTIONS">Options</a></h2>
<dl class="man">
-<dt><b>-c</b><i> config-file</i>
-<dd style="margin-left: 5.0em">Uses the named configuration file.
+<dt><b>-c</b><i> cupsd.conf</i>
+<dd style="margin-left: 5.0em">Uses the named cupsd.conf configuration file.
<dt><b>-f</b>
<dd style="margin-left: 5.0em">Run
<b>cupsd</b>
<b>launchd</b>(8)
or
<b>systemd</b>(8).
+<dt><b>-s</b><i> cups-files.conf</i>
+<dd style="margin-left: 5.0em">Uses the named cups-files.conf configuration file.
<dt><b>-t</b>
<dd style="margin-left: 5.0em">Test the configuration file for syntax errors.
</dl>
<a href="man-backend.html?TOPIC=Man+Pages"><b>backend</b>(7),</a>
<a href="man-classes.conf.html?TOPIC=Man+Pages"><b>classes.conf</b>(5),</a>
<a href="man-cups.html?TOPIC=Man+Pages"><b>cups</b>(1),</a>
+<a href="man-cups-files.conf.html?TOPIC=Man+Pages"><b>cups-files.conf</b>(5),</a>
<a href="man-cups-lpd.html?TOPIC=Man+Pages"><b>cups-lpd</b>(8),</a>
<a href="man-cupsd.conf.html?TOPIC=Man+Pages"><b>cupsd.conf</b>(5),</a>
<a href="man-cupsd-helper.html?TOPIC=Man+Pages"><b>cupsd-helper</b>(8),</a>
<b>systemd</b>(8),
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright © 2007-2015 by Apple Inc.
+Copyright © 2007-2016 by Apple Inc.
</body>
</html>
<dd style="margin-left: 5.0em"><dt><b>Darkness </b><i>temperature </i><b>"</b><i>name</i><b>/</b><i>text</i><b>"</b>
<dd style="margin-left: 5.0em"><dt><b>DriverType </b><i>type</i>
<dd style="margin-left: 5.0em"><dt><b>Duplex </b><i>type</i>
-<dd style="margin-left: 5.0em"><dt><b>Filter Imime-type cost program</b>
+<dd style="margin-left: 5.0em"><dt><b>Filter </b><i>mime-type cost program</i>
<dd style="margin-left: 5.0em"><dt><b>Finishing </b><i>name</i>
<dd style="margin-left: 5.0em"><dt><b>Finishing "</b><i>name</i><b>/</b><i>text</i><b>"</b>
<dd style="margin-left: 5.0em"><dt><b>Font *</b>
--- /dev/null
+README.txt - 2014-08-28
+-----------------------
+
+INTRODUCTION
+
+ This directory contains the IPP Everywhere Printer Self-Certification tools.
+
+ In addition to the files in this directory, you must also download and
+ extract one or more PWG Raster Format file archives from:
+
+ http://ftp.pwg.org/pub/pwg/ipp/examples/
+
+ These archives are used for the Document Data tests.
+
+
+CONTENTS
+
+ Scripts for running the self-certification tests:
+
+ bonjour-tests.bat Bonjour Tests for Windows
+ bonjour-tests.sh Bonjour Tests for Linux and OS X
+
+ ipp-tests.bat IPP Tests for Windows
+ ipp-tests.sh IPP Tests for Linux and OS X
+
+ document-tests.bat Document Data Tests for Windows
+ document-tests.sh Document Data Tests for Linux and OS X
+
+ Tools:
+
+ ippfind Tool for finding printers with Bonjour/DNS-SD
+ ippserver Sample IPP server, useful for testing
+ ipptool IPP test tool
+
+ Documentation:
+
+ LICENSE.txt CUPS software license
+ man-*.html HTML documentation for the tools
+ README.txt This README file
+
+
+GETTING SUPPORT AND OTHER RESOURCES
+
+ The IPP Everywhere home page provides access to all information relevant to
+ IPP Eveywhere:
+
+ http://www.pwg.org/ipp/everywhere.html
+
+ The "ippeveselfcert@pwg.org" mailing list is used to discuss IPP Everywhere
+ Printer Self-Certification. You can subscribe from the following page:
+
+ https://www.pwg.org/mailman/listinfo/ippeveselfcert
+
+
+LEGAL STUFF
+
+ These tools are Copyright 2014 by The Printer Working Group and Copyright
+ 2007-2014 by Apple Inc. CUPS and the CUPS logo are trademarks of Apple Inc.
+ PWG and IPP Everywhere are trademarks of the IEEE-ISTO.
+
+ CUPS is provided under the terms of version 2 of the GNU General Public
+ License and GNU Library General Public License. This program is distributed
+ in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the file "LICENSE.txt" for more information.
--- /dev/null
+#
+# "$Id: bonjour-access-tests.test 12120 2014-08-27 20:52:33Z msweet $"
+#
+# IPP Everywhere Printer Self-Certification Manual 1.0: Section 5: Bonjour Tests.
+#
+# Copyright 2014 by The Printer Working Group.
+# Copyright 2007-2013 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 -tI printer-uri bonjour-access-tests.test
+#
+
+FILE-ID "org.pwg.ipp-everywhere.20140826.bonjour"
+
+{
+ # The name of the test...
+ NAME "Validate access using Get-Printer-Attributes"
+
+ # The operation to use
+ OPERATION Get-Printer-Attributes
+
+ # 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
+
+ # What statuses are OK?
+ STATUS successful-ok
+}
+
+#
+# End of "$Id: bonjour-access-tests.test 12120 2014-08-27 20:52:33Z msweet $".
+#
--- /dev/null
+@echo off
+::
+:: "$Id: bonjour-tests.bat 12249 2014-11-14 12:54:05Z msweet $"
+::
+:: IPP Everywhere Printer Self-Certification Manual 1.0: Section 5: Bonjour Tests.
+::
+:: Copyright 2014 by The Printer Working Group.
+::
+:: This program may be copied and furnished to others, and derivative works
+:: that comment on, or otherwise explain it or assist in its implementation may
+:: be prepared, copied, published and distributed, in whole or in part, without
+:: restriction of any kind, provided that the above copyright notice and this
+:: paragraph are included on all such copies and derivative works.
+::
+:: The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES,
+:: WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED
+:: WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+::
+:: Usage:
+::
+:: bonjour-tests.bat 'Printer Name'
+::
+
+set PLIST=%1 Bonjour Results.plist
+echo Sending output to "%PLIST%"...
+
+:: Write the standard XML plist header...
+echo ^<?xml version=^"1.0^" encoding=^"UTF-8^"?^> >"%PLIST%"
+echo ^<!DOCTYPE plist PUBLIC ^"-//Apple Computer//DTD PLIST 1.0//EN^" ^"http://www.apple.com/DTDs/PropertyList-1.0.dtd^"^> >>"%PLIST%"
+echo ^<plist version=^"1.0^"^> >>"%PLIST%"
+echo ^<dict^> >>"%PLIST%"
+echo ^<key^>Tests^</key^>^<array^> >>"%PLIST%"
+
+set total=0
+set pass=0
+set fail=0
+set skip=0
+
+:: B-1. IPP Browse test: Printers appear in a search for "_ipp._tcp,_print" services?
+set /a total+=1
+set <NUL /p="B-1. IPP Browse test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-1. IPP Browse test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+set result=FAIL
+ippfind _ipp._tcp,_print.local. --name "%1" --quiet && set result=PASS
+if "%result%" == "PASS" (
+ set /a pass+=1
+) else (
+ set /a fail+=1
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-2. IPP TXT keys test: The IPP TXT record contains all required keys.
+set /a total+=1
+set <NUL /p="B-2. IPP TXT keys test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-2. IPP TXT keys test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+set result=FAIL
+ippfind "%1._ipp._tcp.local." --txt adminurl --txt pdl --txt rp --txt UUID --quiet && set result=PASS
+if "%result%" == "PASS" (
+ set /a pass+=1
+) else (
+ set /a fail+=1
+ echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x echo adminurl="{txt_adminurl}" ";" >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x echo pdl="{txt_pdl}" ";" >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x echo rp="{txt_rp}" ";" >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x echo UUID="{txt_uuid}" ";" >>"%PLIST%"
+ echo ^</string^>^</array^> >>"%PLIST%"
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+
+ ippfind "%1._ipp._tcp.local." -x echo adminurl="{txt_adminurl}" ";"
+ ippfind "%1._ipp._tcp.local." -x echo pdl="{txt_pdl}" ";"
+ ippfind "%1._ipp._tcp.local." -x echo rp="{txt_rp}" ";"
+ ippfind "%1._ipp._tcp.local." -x echo UUID="{txt_uuid}" ";"
+) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-3. IPP Resolve test: Printer responds to an IPP Get-Printer-Attributes request using the resolved hostname, port, and resource path.
+set /a total+=1
+set <NUL /p="B-3. IPP Resolve test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-3. IPP Resolve test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+set result=FAIL
+(ippfind "%1._ipp._tcp.local." --ls && set result=PASS) >nul:
+if "%result%" == "PASS" (
+ set /a pass+=1
+) else (
+ set /a fail+=1
+ echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." --ls >>"%PLIST%"
+ echo ^</string^>^</array^> >>"%PLIST%"
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-4. IPP TXT values test: The IPP TXT record values match the reported IPP attribute values.
+set /a total+=1
+set <NUL /p="B-4. IPP TXT values test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-4. IPP TXT values test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+set result=FAIL
+ippfind "%1._ipp._tcp.local." --txt-adminurl ^^^(http:^|https:^)// --txt-pdl image/pwg-raster --txt-pdl image/jpeg --txt-rp ^^ipp/^(print^|print/[^^/]+^)$ --txt-UUID ^^[0-9a-fA-F]{8,8}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{12,12}$ -x ipptool -q -d "ADMINURL={txt_adminurl}" -d "UUID={txt_uuid}" "{}" bonjour-value-tests.test ";" && set result=PASS
+if "%result%" == "PASS" (
+ set /a pass+=1
+) else (
+ set /a fail+=1
+ echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x echo adminurl="{txt_adminurl}" ";" >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x echo pdl="{txt_pdl}" ";" >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x echo rp="{txt_rp}" ";" >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x echo UUID="{txt_uuid}" ";" >>"%PLIST%"
+ ippfind "%1._ipp._tcp.local." -x ipptool -t "{}" bonjour-value-tests.test ";" | findstr /r [TG][EO][DT]: >>"%PLIST%"
+ echo ^</string^>^</array^> >>"%PLIST%"
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+
+ ippfind "%1._ipp._tcp.local." -x echo adminurl="{txt_adminurl}" ";"
+ ippfind "%1._ipp._tcp.local." -x echo pdl="{txt_pdl}" ";"
+ ippfind "%1._ipp._tcp.local." -x echo rp="{txt_rp}" ";"
+ ippfind "%1._ipp._tcp.local." -x echo UUID="{txt_uuid}" ";"
+ ippfind "%1._ipp._tcp.local." -x ipptool -t "{}" bonjour-value-tests.test ";" | findstr /r [TG][EO][DT]:
+) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-5. TLS tests: Performed only if TLS is supported
+set /a total+=1
+set <NUL /p="B-5. TLS tests: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-5. TLS tests^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+set result=SKIP
+ippfind "%1._ipp._tcp.local." --txt tls --quiet && set result=PASS
+if "%result%" == "PASS" (
+ set /a pass+=1
+ set HAVE_TLS=1
+) else (
+ set /a skip+=1
+ set HAVE_TLS=0
+)
+
+echo %result%
+if "%result%" == "SKIP" (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%"
+) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-5.1 HTTP Upgrade test: Printer responds to an IPP Get-Printer-Attributes request after doing an HTTP Upgrade to TLS.
+set /a total+=1
+set <NUL /p="B-5.1 HTTP Upgrade test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.1 HTTP Upgrade test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+if "%HAVE_TLS%" == "1" (
+ set result=FAIL
+ ippfind "%1._ipp._tcp.local." -x ipptool -E -q "{}" bonjour-access-tests.test ";" && set result=PASS
+ if "%result%" == "PASS" (
+ set /a pass+=1
+ ) else (
+ set /a fail+=1
+ echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST"
+ ippfind "%1._ipp._tcp.local." -x ipptool -E -q "{}" bonjour-access-tests.test ";" >>"%PLIST%"
+ echo ^</string^>^</array^> >>"%PLIST%"
+ )
+) else (
+ set /a skip+=1
+ set result=SKIP
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+) else (
+ if "%result%" == "SKIP" (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%"
+ ) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ )
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-5.2 IPPS Browse test: Printer appears in a search for "_ipps._tcp,_print" services.
+set /a total+=1
+set <NUL /p="B-5.2 IPPS Browse test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.2 IPPS Browse test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+if "%HAVE_TLS%" == "1" (
+ set result=FAIL
+ ippfind _ipps._tcp,_print.local. --name "%1" --quiet && set result=PASS
+ if "%result%" == "PASS" (
+ set /a pass+=1
+ ) else (
+ set /a fail+=1
+ )
+) else (
+ set /a skip+=1
+ set result=SKIP
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+) else (
+ if "%result%" == "SKIP" (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%"
+ ) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ )
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-5.3 IPPS TXT keys test: The TXT record for IPPS contains all required keys
+set /a total+=1
+set <NUL /p="B-5.3 IPPS TXT keys test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.3 IPPS TXT keys test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+if "%HAVE_TLS%" == "1" (
+ set result=FAIL
+ ippfind "%1._ipps._tcp.local." --txt adminurl --txt pdl --txt rp --txt TLS --txt UUID --quiet && set result=PASS
+ if "%result%" == "PASS" (
+ set /a pass+=1
+ ) else (
+ set /a fail+=1
+ echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo adminurl={txt_adminurl}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo pdl={txt_pdl}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo rp={txt_rp}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo TLS={txt_tls}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo UUID={txt_uuid}" ";" >>"%PLIST%"
+ echo ^</string^>^</array^> >>"%PLIST%"
+ )
+) else (
+ set /a skip+=1
+ set result=SKIP
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+
+ ippfind "%1._ipps._tcp.local." -x echo adminurl={txt_adminurl}" ";"
+ ippfind "%1._ipps._tcp.local." -x echo pdl={txt_pdl}" ";"
+ ippfind "%1._ipps._tcp.local." -x echo rp={txt_rp}" ";"
+ ippfind "%1._ipps._tcp.local." -x echo TLS={txt_tls}" ";"
+ ippfind "%1._ipps._tcp.local." -x echo UUID={txt_uuid}" ";"
+) else (
+ if "%result%" == "SKIP" (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%"
+ ) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ )
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-5.4 IPPS Resolve test: Printer responds to an IPPS Get-Printer-Attributes request using the resolved hostname, port, and resource path.
+set /a total+=1
+set <NUL /p="B-5.4 IPPS Resolve test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.4 IPPS Resolve test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+if "%HAVE_TLS%" == "1" (
+ set result=FAIL
+ (ippfind "%1._ipps._tcp.local." --ls && set result=PASS) >nul:
+ if "%result%" == "PASS" (
+ set /a pass+=1
+ ) else (
+ set /a fail+=1
+ echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." --ls >>"%PLIST%"
+ echo ^</string^>^</array^> >>"%PLIST%"
+ )
+) else (
+ set /a skip+=1
+ set result=SKIP
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+) else (
+ if "%result%" == "SKIP" (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%"
+ ) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ )
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: B-5.5 IPPS TXT values test: The TXT record values for IPPS match the reported IPPS attribute values.
+set /a total+=1
+set <NUL /p="B-5.5 IPPS TXT values test: "
+echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.5 IPPS TXT values test^</string^> >>"%PLIST%"
+echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%"
+
+if "%HAVE_TLS%" == "1" (
+ set result=FAIL
+ ippfind "%1._ipps._tcp.local." --txt-adminurl ^^^(http:^|https:^)// --txt-pdl image/pwg-raster --txt-pdl image/jpeg --txt-rp ^^ipp/^(print^|print/[^^/]+^)$ --txt-UUID ^^[0-9a-fA-F]{8,8}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{12,12}$ -x ipptool -q "{}" bonjour-value-tests.test ";" && set result=PASS
+ if "%result%" == "PASS" (
+ set /a pass+=1
+ ) else (
+ set /a fail+=1
+ echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo adminurl="{txt_adminurl}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo pdl="{txt_pdl}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo rp="{txt_rp}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo TLS="{txt_tls}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x echo UUID="{txt_uuid}" ";" >>"%PLIST%"
+ ippfind "%1._ipps._tcp.local." -x ipptool -t "{}" bonjour-value-tests.test ";" | findstr /r [TG][EO][DT]: >>"%PLIST"
+ echo ^</string^>^</array^> >>"%PLIST%"
+ )
+) else (
+ set /a skip+=1
+ set result=SKIP
+)
+
+echo %result%
+if "%result%" == "FAIL" (
+ echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%"
+
+ ippfind "%1._ipps._tcp.local." -x echo adminurl="{txt_adminurl}" ";"
+ ippfind "%1._ipps._tcp.local." -x echo pdl="{txt_pdl}" ";"
+ ippfind "%1._ipps._tcp.local." -x echo rp="{txt_rp}" ";"
+ ippfind "%1._ipps._tcp.local." -x echo TLS="{txt_tls}" ";"
+ ippfind "%1._ipps._tcp.local." -x echo UUID="{txt_uuid}" ";"
+ ippfind "%1._ipp._tcp.local." -x ipptool -t "{}" bonjour-value-tests.test ";" | findstr /r [TG][EO][DT]:
+) else (
+ if "%result%" == "SKIP" (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%"
+ ) else (
+ echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%"
+ )
+)
+echo ^</dict^> >>"%PLIST%"
+
+:: Finish up...
+echo ^</array^> >>"%PLIST%"
+echo ^<key^>Successful^</key^> >>"%PLIST%"
+if %fail% gtr 0 (
+ echo ^<false /^> >>"%PLIST%"
+) else (
+ echo ^<true /^> >>"%PLIST%"
+)
+echo ^</dict^> >>"%PLIST%"
+echo ^</plist^> >>"%PLIST%"
+
+set /a score=%pass% + %skip%
+set /a score=100 * %score% / %total%
+echo Summary: %total% tests, %pass% passed, %fail% failed, %skip% skipped
+echo Score: %score%%%
+
+::
+:: End of "$Id: bonjour-tests.bat 12249 2014-11-14 12:54:05Z msweet $".
+::
--- /dev/null
+#!/bin/sh
+#
+# "$Id: bonjour-tests.sh 12144 2014-09-02 13:40:27Z msweet $"
+#
+# IPP Everywhere Printer Self-Certification Manual 1.0: Section 5: Bonjour Tests.
+#
+# Copyright 2014 by The Printer Working Group.
+#
+# This program may be copied and furnished to others, and derivative works
+# that comment on, or otherwise explain it or assist in its implementation may
+# be prepared, copied, published and distributed, in whole or in part, without
+# restriction of any kind, provided that the above copyright notice and this
+# paragraph are included on all such copies and derivative works.
+#
+# The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES,
+# WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED
+# WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Usage:
+#
+# ./bonjour-tests.sh "Printer Name"
+#
+
+if test -x ../test/ippfind-static; then
+ IPPFIND="../test/ippfind-static"
+elif test -x ./ippfind; then
+ IPPFIND="./ippfind"
+else
+ IPPFIND="ippfind"
+fi
+
+if test -x ../test/ipptool-static; then
+ IPPTOOL="../test/ipptool-static"
+elif test -x ./ipptool; then
+ IPPTOOL="./ipptool"
+else
+ IPPTOOL="ipptool"
+fi
+
+PLIST="$1 Bonjour Results.plist"
+
+#
+# Figure out the proper echo options...
+#
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ ac_n=-n
+ ac_c=
+else
+ ac_n=
+ ac_c='\c'
+fi
+
+# Special case "_failN" name to show bad/missing TXT keys
+if test "$2" = _fail2 -o "$2" = _fail4 -o "$2" = _fail5.3 -o "$2" = _fail5.5; then
+ echo "FAIL"
+ echo "<key>Errors</key><array>" >>"$PLIST"
+ if test "${IPPFIND_TXT_ADMINURL:-NOTSET}" = NOTSET; then
+ echo " adminurl is not set."
+ echo "<string>adminurl is not set.</string>" >>"$PLIST"
+ elif test "$2" = _fail4 -o "$2" = _fail5.5; then
+ case "$IPPFIND_TXT_ADMINURL" in
+ http://* | https://*)
+ ;;
+ *)
+ echo " adminurl has bad value '$IPPFIND_TXT_ADMINURL'."
+ echo "<string>adminurl has bad value '$IPPFIND_TXT_ADMINURL'.</string>" >>"$PLIST"
+ ;;
+ esac
+ fi
+
+ if test "${IPPFIND_TXT_PDL:-NOTSET}" = NOTSET; then
+ echo " pdl is not set."
+ echo "<string>pdl is not set.</string>" >>"$PLIST"
+ elif test "$2" = _fail4 -o "$2" = _fail5.5; then
+ case "$IPPFIND_TXT_PDL" in
+ *image/jpeg*)
+ ;;
+ *)
+ echo " pdl is missing image/jpeg: '$IPPFIND_TXT_PDL'"
+ echo "<string>pdl is missing image/jpeg: '$IPPFIND_TXT_PDL'.</string>" >>"$PLIST"
+ ;;
+ esac
+
+ case "$IPPFIND_TXT_PDL" in
+ *image/pwg-raster*)
+ ;;
+ *)
+ echo " pdl is missing image/pwg-raster: '$IPPFIND_TXT_PDL'"
+ echo "<string>pdl is missing image/pwg-raster: '$IPPFIND_TXT_PDL'.</string>" >>"$PLIST"
+ ;;
+ esac
+ fi
+
+ if test "${IPPFIND_TXT_RP:-NOTSET}" = NOTSET; then
+ echo " rp is not set."
+ echo "<string>rp is not set.</string>" >>"$PLIST"
+ elif test "$2" = _fail4 -o "$2" = _fail5.5; then
+ case "$IPPFIND_TXT_RP" in
+ ipp/print | ipp/print/*)
+ ;;
+ *)
+ echo " rp has bad value '$IPPFIND_TXT_RP'"
+ echo "<string>rp has bad value '$IPPFIND_TXT_RP'.</string>" >>"$PLIST"
+ ;;
+ esac
+ fi
+
+ if test "${IPPFIND_TXT_UUID:-NOTSET}" = NOTSET; then
+ echo " UUID is not set."
+ echo "<string>UUID is not set.</string>" >>"$PLIST"
+ elif test "$2" = _fail4 -o "$2" = _fail5.5; then
+ case "$IPPFIND_TXT_UUID" in
+ [0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])
+ ;;
+ *)
+ echo " UUID has bad value '$IPPFIND_TXT_UUID'"
+ echo "<string>UUID has bad value '$IPPFIND_TXT_UUID'.</string>" >>"$PLIST"
+ ;;
+ esac
+ fi
+
+ if test "$2" = _fail4 -o "$2" = _fail5.5; then
+ $IPPTOOL -t $IPPFIND_SERVICE_URI bonjour-value-tests.test
+ $IPPTOOL -t $IPPFIND_SERVICE_URI bonjour-value-tests.test | egrep '(GOT|EXPECTED):' | sed -e '1,$s/^[ ]*//' | awk '{print "<string>" $0 "</string>" }' >>"$PLIST"
+ fi
+
+ echo "</array>" >>"$PLIST"
+ echo "<key>Successful</key><false />" >>"$PLIST"
+ echo "</dict>" >>"$PLIST"
+
+ exit 0
+fi
+
+
+# Write the standard XML plist header...
+cat >"$PLIST" <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+<key>Tests</key><array>
+EOF
+
+total=0
+pass=0
+fail=0
+skip=0
+
+# start_test "name"
+start_test() {
+ total=`expr $total + 1`
+ echo $ac_n "$1: $ac_c"
+ echo "<dict><key>Name</key><string>$1</string>" >>"$PLIST"
+ echo "<key>FileId</key><string>org.pwg.ipp-everywhere.20140826.bonjour</string>" >>"$PLIST"
+}
+# end_test PASS/FAIL/SKIP
+end_test() {
+ echo $1
+ if test $1 = FAIL; then
+ echo "<key>Successful</key><false />" >>"$PLIST"
+ elif test $1 = SKIP; then
+ echo "<key>Successful</key><true />" >>"$PLIST"
+ echo "<key>Skipped</key><true />" >>"$PLIST"
+ else
+ echo "<key>Successful</key><true />" >>"$PLIST"
+ fi
+ echo "</dict>" >>"$PLIST"
+}
+
+# B-1. IPP Browse test: Printers appear in a search for "_ipp._tcp,_print" services?
+start_test "B-1. IPP Browse test"
+$IPPFIND _ipp._tcp,_print.local. --name "$1" --quiet
+if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+else
+ fail=`expr $fail + 1`
+ end_test FAIL
+fi
+
+# B-2. IPP TXT keys test: The IPP TXT record contains all required keys.
+start_test "B-2. IPP TXT keys test"
+$IPPFIND "$1._ipp._tcp.local." --txt adminurl --txt pdl --txt rp --txt UUID --quiet
+if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+else
+ fail=`expr $fail + 1`
+ $IPPFIND "$1._ipp._tcp.local." -x ./bonjour-tests.sh '{service_name}' _fail2 \;
+fi
+
+# B-3. IPP Resolve test: Printer responds to an IPP Get-Printer-Attributes request using the resolved hostname, port, and resource path.
+start_test "B-3. IPP Resolve test"
+$IPPFIND "$1._ipp._tcp.local." --ls >/dev/null
+if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+else
+ fail=`expr $fail + 1`
+ echo "<key>Errors</key><array>" >>"$PLIST"
+ $IPPFIND "$1._ipp._tcp.local." --ls | awk '{ print "<string>" $0 "</string>" }' >>"$PLIST"
+ echo "</array>" >>"$PLIST"
+ end_test FAIL
+fi
+
+# B-4. IPP TXT values test: The IPP TXT record values match the reported IPP attribute values.
+start_test "B-4. IPP TXT values test"
+$IPPFIND "$1._ipp._tcp.local." --txt-adminurl '^(http:|https:)//' --txt-pdl 'image/pwg-raster' --txt-pdl 'image/jpeg' --txt-rp '^ipp/(print|print/[^/]+)$' --txt-UUID '^[0-9a-fA-F]{8,8}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{12,12}$' -x $IPPTOOL -q '{}' bonjour-value-tests.test \;
+if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+else
+ fail=`expr $fail + 1`
+ $IPPFIND "$1._ipp._tcp.local." -x ./bonjour-tests.sh '{service_name}' _fail4 \;
+fi
+
+# B-5. TLS tests: Performed only if TLS is supported
+start_test "B-5. TLS tests"
+$IPPFIND "$1._ipp._tcp.local." --txt tls --quiet
+if test $? = 0; then
+ pass=`expr $pass + 1`
+ HAVE_TLS=1
+ end_test PASS
+else
+ skip=`expr $skip + 1`
+ HAVE_TLS=0
+ end_test SKIP
+fi
+
+# B-5.1 HTTP Upgrade test: Printer responds to an IPP Get-Printer-Attributes request after doing an HTTP Upgrade to TLS.
+start_test "B-5.1 HTTP Upgrade test"
+if test $HAVE_TLS = 1; then
+ error=`$IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -E -q '{}' bonjour-access-tests.test \; 2>&1`
+ if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+ else
+ fail=`expr $fail + 1`
+ echo "<key>Errors</key><array><string>$error</string></array>" >>"$PLIST"
+
+ end_test FAIL
+ echo " $error"
+ fi
+else
+ skip=`expr $skip + 1`
+ end_test SKIP
+fi
+
+# B-5.2 IPPS Browse test: Printer appears in a search for "_ipps._tcp,_print" services.
+start_test "B-5.2 IPPS Browse test"
+if test $HAVE_TLS = 1; then
+ $IPPFIND _ipps._tcp,_print.local. --name "$1" --quiet
+ if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+ else
+ fail=`expr $fail + 1`
+ end_test FAIL
+ fi
+else
+ skip=`expr $skip + 1`
+ end_test SKIP
+fi
+
+# B-5.3 IPPS TXT keys test: The TXT record for IPPS contains all required keys
+start_test "B-5.3 IPPS TXT keys test"
+if test $HAVE_TLS = 1; then
+ $IPPFIND "$1._ipps._tcp.local." --txt adminurl --txt pdl --txt rp --txt TLS --txt UUID --quiet
+ if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+ else
+ fail=`expr $fail + 1`
+ $IPPFIND "$1._ipps._tcp.local." -x ./bonjour-tests.sh '{service_name}' _fail5.3 \;
+ fi
+else
+ skip=`expr $skip + 1`
+ end_test SKIP
+fi
+
+# B-5.4 IPPS Resolve test: Printer responds to an IPPS Get-Printer-Attributes request using the resolved hostname, port, and resource path.
+start_test "B-5.4 IPPS Resolve test"
+if test $HAVE_TLS = 1; then
+ $IPPFIND "$1._ipps._tcp.local." --ls >/dev/null
+ if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+ else
+ fail=`expr $fail + 1`
+ echo "<key>Errors</key><array>" >>"$PLIST"
+ $IPPFIND "$1._ipps._tcp.local." --ls | awk '{ print "<string>" $0 "</string>" }' >>"$PLIST"
+ echo "</array>" >>"$PLIST"
+ end_test FAIL
+ fi
+else
+ skip=`expr $skip + 1`
+ end_test SKIP
+fi
+
+# B-5.5 IPPS TXT values test: The TXT record values for IPPS match the reported IPPS attribute values.
+start_test "B-5.5 IPPS TXT values test"
+if test $HAVE_TLS = 1; then
+ $IPPFIND "$1._ipps._tcp.local." --txt-adminurl '^(http:|https:)//' --txt-pdl 'image/pwg-raster' --txt-pdl 'image/jpeg' --txt-rp '^ipp/(print|print/[^/]+)$' --txt-UUID '^[0-9a-fA-F]{8,8}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{12,12}$' -x $IPPTOOL -q '{}' bonjour-value-tests.test \;
+ if test $? = 0; then
+ pass=`expr $pass + 1`
+ end_test PASS
+ else
+ fail=`expr $fail + 1`
+ $IPPFIND "$1._ipps._tcp.local." -x ./bonjour-tests.sh '{service_name}' _fail5.5 \;
+ fi
+else
+ skip=`expr $skip + 1`
+ end_test SKIP
+fi
+
+# Finish up...
+if test $fail -gt 0; then
+ cat >>"$PLIST" <<EOF
+</array>
+<key>Successful</key>
+<false />
+EOF
+else
+ cat >>"$PLIST" <<EOF
+</array>
+<key>Successful</key>
+<true />
+EOF
+fi
+
+cat >>"$PLIST" <<EOF
+</dict>
+</plist>
+EOF
+
+score=`expr $pass + $skip`
+score=`expr 100 \* $score / $total`
+echo "Summary: $total tests, $pass passed, $fail failed, $skip skipped"
+echo "Score: ${score}%"
+
+#
+# End of "$Id: bonjour-tests.sh 12144 2014-09-02 13:40:27Z msweet $".
+#
--- /dev/null
+#
+# "$Id: bonjour-value-tests.test 12143 2014-09-02 13:37:30Z msweet $"
+#
+# IPP Everywhere Printer Self-Certification Manual 1.0: Section 5: Bonjour Tests.
+#
+# Copyright 2014 by The Printer Working Group.
+# Copyright 2007-2013 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:
+#
+# (run from within ippfind)
+# ippfind ... -x ipptool -t "{}" bonjour-value-tests.test ";"
+#
+
+FILE-ID "org.pwg.ipp-everywhere.20140826.bonjour"
+
+{
+ # The name of the test...
+ NAME "Validate TXT record values using Get-Printer-Attributes"
+
+ # The operation to use
+ OPERATION Get-Printer-Attributes
+
+ # 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
+
+ # What statuses are OK?
+ STATUS successful-ok
+
+ # What attributes do we expect?
+ EXPECT printer-more-info OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$ENV[IPPFIND_TXT_ADMINURL]"
+ EXPECT printer-uuid OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "urn:uuid:$ENV[IPPFIND_TXT_UUID]"
+}
+
+#
+# End of "$Id: bonjour-value-tests.test 12143 2014-09-02 13:37:30Z msweet $".
+#
--- /dev/null
+@echo off
+::
+:: "$Id: document-tests.bat 12249 2014-11-14 12:54:05Z msweet $"
+::
+:: IPP Everywhere Printer Self-Certification Manual 1.0: Section 7: Document Data Tests.
+::
+:: Copyright 2014 by The Printer Working Group.
+::
+:: This program may be copied and furnished to others, and derivative works
+:: that comment on, or otherwise explain it or assist in its implementation may
+:: be prepared, copied, published and distributed, in whole or in part, without
+:: restriction of any kind, provided that the above copyright notice and this
+:: paragraph are included on all such copies and derivative works.
+::
+:: The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES,
+:: WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED
+:: WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+::
+:: Usage:
+::
+:: document-tests.bat 'Printer Name'
+::
+
+ippfind "%1._ipp._tcp.local." -x ipptool -P "\"%1 Document Results.plist\"" -I "{}" document-tests.test ";"
+
+::
+:: End of "$Id: document-tests.bat 12249 2014-11-14 12:54:05Z msweet $".
+::
--- /dev/null
+#!/bin/sh
+#
+# "$Id: document-tests.sh 12127 2014-08-28 18:57:27Z msweet $"
+#
+# IPP Everywhere Printer Self-Certification Manual 1.0: Section 7: Document Data Tests.
+#
+# Copyright 2014 by The Printer Working Group.
+#
+# This program may be copied and furnished to others, and derivative works
+# that comment on, or otherwise explain it or assist in its implementation may
+# be prepared, copied, published and distributed, in whole or in part, without
+# restriction of any kind, provided that the above copyright notice and this
+# paragraph are included on all such copies and derivative works.
+#
+# The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES,
+# WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED
+# WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Usage:
+#
+# ./document-tests.sh "Printer Name"
+#
+
+if test -x ../test/ippfind-static; then
+ IPPFIND="../test/ippfind-static"
+elif test -x ./ippfind; then
+ IPPFIND="./ippfind"
+else
+ IPPFIND="ippfind"
+fi
+
+if test -x ../test/ipptool-static; then
+ IPPTOOL="../test/ipptool-static"
+elif test -x ./ipptool; then
+ IPPTOOL="./ipptool"
+else
+ IPPTOOL="ipptool"
+fi
+
+for file in color.jpg document-a4.pdf document-letter.pdf; do
+ if test ! -f $file -a -f ../test/$file; then
+ ln -s ../test/$file .
+ fi
+done
+
+if test "`ls -d pwg-raster-samples-*dpi-20111130 2>/dev/null`" = ""; then
+ echo "You must first download and extract the PWG Raster Format sample files from:"
+ echo ""
+ echo " http://ftp.pwg.org/pub/pwg/ipp/examples/"
+ echo ""
+ echo "Before you can run this script."
+ exit 1
+fi
+
+$IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -P "$1 Document Results.plist" -I '{}' document-tests.test \;
+
+#
+# End of "$Id: document-tests.sh 12127 2014-08-28 18:57:27Z msweet $".
+#
--- /dev/null
+#
+# "$Id: document-tests.test 12127 2014-08-28 18:57:27Z msweet $"
+#
+# IPP Everywhere Printer Self-Certification Manual 1.0: Section 7: Document Data Tests.
+#
+# Copyright 2014 by The Printer Working Group.
+# Copyright 2007-2013 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 -tI printer-uri document-tests.test
+#
+# This test file depends on document data files available at:
+#
+# http://ftp.pwg.org/pub/pwg/ipp/examples
+#
+# The ZIP files should be extracted in the same directory as the test files,
+# for example the 600dpi files will exist in a directory called
+# "pwg-raster-samples-600dpi-20111130". The script used to generate the raster
+# data is available in the "everywhere" subdirectory of the CUPS source code.
+#
+
+FILE-ID "org.pwg.ipp-everywhere.20140826.document"
+
+{
+ NAME "D-1. PWG Raster Format Tests (mandatory)"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+
+ EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "deflate" DEFINE-MATCH HAVE_DEFLATE
+ EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "gzip" DEFINE-MATCH HAVE_GZIP
+
+ EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/pwg-raster"
+
+ EXPECT pwg-raster-document-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag DEFINE-VALUE RASTER_RESOLUTION
+
+ EXPECT pwg-raster-document-type-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "black-1" DEFINE-MATCH HAVE_BLACK
+ EXPECT pwg-raster-document-type-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "sgray-8" DEFINE-MATCH HAVE_SGRAY
+ EXPECT pwg-raster-document-type-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "srgb-8" DEFINE-MATCH HAVE_SRGB
+ EXPECT pwg-raster-document-type-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "cmyk-8" DEFINE-MATCH HAVE_CMYK
+}
+
+#### 1.1 NO COMPRESSION ####
+{
+ SKIP-IF-NOT-DEFINED HAVE_BLACK
+ NAME "D-1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, black-1"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/black-1/color.jpg-4x6-black-1-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SGRAY
+ NAME "D-1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, sgray-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/sgray-8/color.jpg-4x6-sgray-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SRGB
+ NAME "D-1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, srgb-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/srgb-8/color.jpg-4x6-srgb-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_CMYK
+ NAME "D-1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, cmyk-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/cmyk-8/color.jpg-4x6-cmyk-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+
+#### 1.2 DEFLATE COMPRESSION ####
+{
+ SKIP-IF-NOT-DEFINED HAVE_BLACK
+ SKIP-IF-NOT-DEFINED HAVE_DEFLATE
+ NAME "D-1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1, deflate"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, black-1\, deflate"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ ATTR keyword compression deflate
+ COMPRESSION deflate
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/black-1/color.jpg-4x6-black-1-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SGRAY
+ SKIP-IF-NOT-DEFINED HAVE_DEFLATE
+ NAME "D-1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8, deflate"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, sgray-8\, deflate"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ ATTR keyword compression deflate
+ COMPRESSION deflate
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/sgray-8/color.jpg-4x6-sgray-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SRGB
+ SKIP-IF-NOT-DEFINED HAVE_DEFLATE
+ NAME "D-1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8, deflate"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, srgb-8\, deflate"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ ATTR keyword compression deflate
+ COMPRESSION deflate
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/srgb-8/color.jpg-4x6-srgb-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_CMYK
+ SKIP-IF-NOT-DEFINED HAVE_DEFLATE
+ NAME "D-1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8, deflate"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, cmyk-8\, deflate"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ ATTR keyword compression deflate
+ COMPRESSION deflate
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/cmyk-8/color.jpg-4x6-cmyk-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+
+#### 1.3 GZIP COMPRESSION ####
+{
+ SKIP-IF-NOT-DEFINED HAVE_BLACK
+ SKIP-IF-NOT-DEFINED HAVE_GZIP
+ NAME "D-1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1, gzip"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, black-1\, gzip"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ ATTR keyword compression gzip
+ COMPRESSION gzip
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/black-1/color.jpg-4x6-black-1-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SGRAY
+ SKIP-IF-NOT-DEFINED HAVE_GZIP
+ NAME "D-1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8, gzip"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, sgray-8\, gzip"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ ATTR keyword compression gzip
+ COMPRESSION gzip
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/sgray-8/color.jpg-4x6-sgray-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SRGB
+ SKIP-IF-NOT-DEFINED HAVE_GZIP
+ NAME "D-1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8, gzip"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, srgb-8\, gzip"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ ATTR keyword compression gzip
+ COMPRESSION gzip
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/srgb-8/color.jpg-4x6-srgb-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_CMYK
+ SKIP-IF-NOT-DEFINED HAVE_GZIP
+ NAME "D-1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8, gzip"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg-4x6.pwg @ $RASTER_RESOLUTION\, cmyk-8\, gzip"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ ATTR keyword compression gzip
+ COMPRESSION gzip
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/cmyk-8/color.jpg-4x6-cmyk-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+
+#### 1.4 A4 TESTS ####
+{
+ SKIP-IF-NOT-DEFINED HAVE_BLACK
+ NAME "D-1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, black-1"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-a4.pwg @ $RASTER_RESOLUTION\, black-1"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/black-1/document-a4-black-1-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SGRAY
+ NAME "D-1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, sgray-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-a4.pwg @ $RASTER_RESOLUTION\, sgray-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/sgray-8/document-a4-sgray-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SRGB
+ NAME "D-1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, srgb-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-a4.pwg @ $RASTER_RESOLUTION\, srgb-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/srgb-8/document-a4-srgb-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_CMYK
+ NAME "D-1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, cmyk-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-a4.pwg @ $RASTER_RESOLUTION\, cmyk-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/cmyk-8/document-a4-cmyk-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+
+#### 1.5 US Letter TESTS ####
+{
+ SKIP-IF-NOT-DEFINED HAVE_BLACK
+ NAME "D-1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, black-1"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pwg @ $RASTER_RESOLUTION\, black-1"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/black-1/document-letter-black-1-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SGRAY
+ NAME "D-1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, sgray-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pwg @ $RASTER_RESOLUTION\, sgray-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/sgray-8/document-letter-sgray-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_SRGB
+ NAME "D-1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, srgb-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pwg @ $RASTER_RESOLUTION\, srgb-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/srgb-8/document-letter-srgb-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_CMYK
+ NAME "D-1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, cmyk-8"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pwg @ $RASTER_RESOLUTION\, cmyk-8"
+ ATTR mimeMediaType document-format "image/pwg-raster"
+ FILE "pwg-raster-samples-${RASTER_RESOLUTION}-20111130/cmyk-8/document-letter-cmyk-8-600dpi.pwg"
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+
+#### JPEG Tests
+{
+ NAME "D-2. JPEG Tests (mandatory)"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+
+ EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/jpeg"
+}
+{
+ NAME "D-2.1 Print color.jpg with defaults"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg with defaults"
+ ATTR mimeMediaType document-format "image/jpeg"
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ NAME "D-2.2 Print color.jpg with copies=2"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg with copies=2"
+ ATTR mimeMediaType document-format "image/jpeg"
+ GROUP job-attributes-tag
+ ATTR integer copies 2
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ NAME "D-2.3 Print color.jpg with print-color-mode=monochrome"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg with print-color-mode=monochrome"
+ ATTR mimeMediaType document-format "image/jpeg"
+ GROUP job-attributes-tag
+ ATTR keyword print-color-mode monochrome
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ NAME "D-2.4 Print color.jpg with media=na_letter_8.5x11in and ipp-attribute-fidelity=true"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg with media=na_letter_8.5x11in and ipp-attribute-fidelity=true"
+ ATTR mimeMediaType document-format "image/jpeg"
+ ATTR boolean ipp-attribute-fidelity true
+ GROUP job-attributes-tag
+ ATTR keyword media na_letter_8.5x11in
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ NAME "D-2.5 Print color.jpg with media=iso_a4_210x297mm and ipp-attribute-fidelity=true"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg with media=iso_a4_210x297mm and ipp-attribute-fidelity=true"
+ ATTR mimeMediaType document-format "image/jpeg"
+ ATTR boolean ipp-attribute-fidelity true
+ GROUP job-attributes-tag
+ ATTR keyword media iso_a4_210x297mm
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+
+#### PDF Tests
+{
+ NAME "D-3. PDF Tests (if PDF is supported)"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+
+ EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "application/pdf" DEFINE-MATCH HAVE_PDF
+ EXPECT sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "two-sided-long-edge" DEFINE-MATCH HAVE_DUPLEX
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_PDF
+ NAME "D-3.1 Print document-letter.pdf with defaults"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pdf with defaults"
+ ATTR mimeMediaType document-format "application/pdf"
+ FILE "document-letter.pdf"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_PDF
+ NAME "D-3.2 Print document-letter.pdf with copies=2"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pdf with copies=2"
+ ATTR mimeMediaType document-format "application/pdf"
+ GROUP job-attributes-tag
+ ATTR integer copies 2
+ FILE "document-letter.pdf"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_PDF
+ NAME "D-3.3 Print document-letter.pdf with page-ranges=3-3 and print-color-mode=monochrome"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pdf with page-ranges=3-3 and print-color-mode=monochrome"
+ ATTR mimeMediaType document-format "application/pdf"
+ GROUP job-attributes-tag
+ ATTR rangeOfInteger page-ranges 3-3
+ ATTR keyword print-color-mode monochrome
+ FILE "document-letter.pdf"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_PDF
+ SKIP-IF-NOT-DEFINED HAVE_DUPLEX
+ NAME "D-3.4 Print document-letter.pdf with sides=two-sided-long-edge"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pdf with sides=two-sided-long-edge"
+ ATTR mimeMediaType document-format "application/pdf"
+ GROUP job-attributes-tag
+ ATTR keyword sides two-sided-long-edge
+ FILE "document-letter.pdf"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_PDF
+ NAME "D-3.5 Print document-letter.pdf with media=iso_a4_210x297mm and ipp-attribute-fidelity=true"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-letter.pdf with media=iso_a4_210x297mm and ipp-attribute-fidelity=true"
+ ATTR mimeMediaType document-format "application/pdf"
+ ATTR boolean ipp-attribute-fidelity true
+ GROUP job-attributes-tag
+ ATTR keyword media iso_a4_210x297mm
+ FILE "document-letter.pdf"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+{
+ SKIP-IF-NOT-DEFINED HAVE_PDF
+ NAME "D-3.6 Print document-a4.pdf with media=na_letter_8.5x11in and ipp-attribute-fidelity=true"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "document-a4.pdf with media=na_letter_8.5x11in and ipp-attribute-fidelity=true"
+ ATTR mimeMediaType document-format "application/pdf"
+ ATTR boolean ipp-attribute-fidelity true
+ GROUP job-attributes-tag
+ ATTR keyword media na_letter_8.5x11in
+ FILE "document-a4.pdf"
+
+ STATUS successful-ok
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+}
+
+#
+# End of "$Id: document-tests.test 12127 2014-08-28 18:57:27Z msweet $".
+#
--- /dev/null
+@echo off
+::
+:: "$Id: ipp-tests.bat 12249 2014-11-14 12:54:05Z msweet $"
+::
+:: IPP Everywhere Printer Self-Certification Manual 1.0: Section 6: IPP Tests.
+::
+:: Copyright 2014 by The Printer Working Group.
+::
+:: This program may be copied and furnished to others, and derivative works
+:: that comment on, or otherwise explain it or assist in its implementation may
+:: be prepared, copied, published and distributed, in whole or in part, without
+:: restriction of any kind, provided that the above copyright notice and this
+:: paragraph are included on all such copies and derivative works.
+::
+:: The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES,
+:: WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED
+:: WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+::
+:: Usage:
+::
+:: ipp-tests.bat 'Printer Name'
+::
+
+ippfind "%1._ipp._tcp.local." -x ipptool -P "\"%1 IPP Results.plist\"" -I "{}" ipp-tests.test ";"
+
+::
+:: End of "$Id: ipp-tests.bat 12249 2014-11-14 12:54:05Z msweet $".
+::
--- /dev/null
+#!/bin/sh
+#
+# "$Id: ipp-tests.sh 12127 2014-08-28 18:57:27Z msweet $"
+#
+# IPP Everywhere Printer Self-Certification Manual 1.0: Section 6: IPP Tests.
+#
+# Copyright 2014 by The Printer Working Group.
+#
+# This program may be copied and furnished to others, and derivative works
+# that comment on, or otherwise explain it or assist in its implementation may
+# be prepared, copied, published and distributed, in whole or in part, without
+# restriction of any kind, provided that the above copyright notice and this
+# paragraph are included on all such copies and derivative works.
+#
+# The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES,
+# WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED
+# WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Usage:
+#
+# ./ipp-tests.sh "Printer Name"
+#
+
+if test -x ../test/ippfind-static; then
+ IPPFIND="../test/ippfind-static"
+elif test -x ./ippfind; then
+ IPPFIND="./ippfind"
+else
+ IPPFIND="ippfind"
+fi
+
+if test -x ../test/ipptool-static; then
+ IPPTOOL="../test/ipptool-static"
+elif test -x ./ipptool; then
+ IPPTOOL="./ipptool"
+else
+ IPPTOOL="ipptool"
+fi
+
+for file in color.jpg; do
+ if test ! -f $file -a -f ../test/$file; then
+ ln -s ../test/$file .
+ fi
+done
+
+$IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -P "$1 IPP Results.plist" -I '{}' ipp-tests.test \;
+
+#
+# End of "$Id: ipp-tests.sh 12127 2014-08-28 18:57:27Z msweet $".
+#
--- /dev/null
+#
+# "$Id: ipp-tests.test 12690 2015-06-04 16:34:20Z msweet $"
+#
+# IPP Everywhere Printer Self-Certification Manual 1.0: Section 6: IPP Tests.
+#
+# Copyright 2014-2015 by The Printer Working Group.
+# Copyright 2007-2013 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 -tI printer-uri ipp-tests.test
+#
+# History:
+#
+# This test file is loosely based on the IPP/1.1, IPP/2.0 and IPP Everywhere
+# test files from the CUPS "test" directory. Many of those tests have been
+# combined or removed, and all print tests are performed using a sample JPEG
+# file. These tests also validate support for the 'media-empty' and
+# 'media-needed' keywords in the "printer-state-reasons" Printer attribute.
+#
+
+FILE-ID "org.pwg.ipp-everywhere.20140826.ipp"
+
+# All tests use IPP version 2.0, unless overridden in a test...
+VERSION 2.0
+
+# Regular expressions for URI schemes:
+#
+# HTTP_URI_SCHEME - Matches strings beginning with http:// or https://
+# IPP_URI_SCHEME - Matches strings beginning with ipp:// or ipps://
+# UUID_URI - Matches UUID URN strings.
+
+DEFINE HTTP_URI_SCHEME "/^https?://.+$$/"
+DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/"
+DEFINE LINK_LOCAL "/^(\[|\[v1.)fe80:/"
+DEFINE UUID_URI "/^urn:uuid:[0-9A-Fa-f]{8,8}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{4,4}-[0-9A-Fa-f]{12,12}/"
+
+# Regular expression for PWG media size names (eek!)
+#
+# Generated with help from: http://www.msweet.org/abnf.php
+DEFINE MEDIA_REGEX "/^(choice(_((custom|na|asme|roc|oe|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)){2,}|(custom|na|asme|roc|oe|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])in|(custom|iso|jis|jpn|prc|om|roll)_[a-z0-9][-a-z0-9]*_([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])x([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])mm)$$/"
+
+# Regular expression for printer-alert attribute
+#
+# Generated with help from: http://www.msweet.org/abnf.php
+DEFINE ALERT_REGEX "/^code\=[A-Za-z]+(;(index\=[0-9]+|severity\=[A-Za-z]+|training\=[A-Za-z]+|group\=[A-Za-z]+|groupindex\=[0-9]+|location\=[0-9]+|time\=[0-9]+)){0,1}$$/"
+
+# Regular expression for printer-supply attribute
+#
+# Generated with help from: http://www.msweet.org/abnf.php
+DEFINE SUPPLY_REGEX "/^(type\=[A-Za-z]+|(maxcapacity\=([0-9]|\-){0,1})(level\=([0-9]|\-){0,1})|);*((index\=[0-9]+|markerindex\=[0-9]+|class\=[A-Za-z]+|unit\=[A-Za-z]+|colorantindex\=[0-9]+|colorantrole\=[A-Za-z]+|colorantname\=[A-Za-z]+|coloranttonality\=[0-9]+);){0,1}$$/"
+
+# Test that a request-id value of 0 is not accepted.
+#
+# Required by: RFC 2911 section 3.1.1
+{
+ NAME "I-1. RFC 2911 section 3.1.1: Bad request-id value 0"
+ REQUEST-ID 0
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+
+ STATUS client-error-bad-request
+ EXPECT !printer-uri-supported
+}
+
+
+# Test that the first two attributes must be attributes-charset and
+# attributes-natural-language.
+#
+# Required by: RFC 2911 section 3.1.4
+{
+ NAME "I-2. RFC 2911 section 3.1.4: No Operation Attributes"
+ REQUEST-ID random
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+
+ STATUS client-error-bad-request
+ EXPECT !printer-uri-supported
+}
+{
+ NAME "I-3. RFC 2911 section 3.1.4: attributes-charset"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR uri printer-uri $uri
+
+ STATUS client-error-bad-request
+ EXPECT !printer-uri-supported
+}
+{
+ NAME "I-4. RFC 2911 section 3.1.4: attributes-natural-language"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+
+ STATUS client-error-bad-request
+ EXPECT !printer-uri-supported
+}
+{
+ NAME "I-5. RFC 2911 section 3.1.4: attributes-natural-language + attributes-charset"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR charset attributes-charset utf-8
+ ATTR uri printer-uri $uri
+
+ STATUS client-error-bad-request
+ EXPECT !printer-uri-supported
+}
+{
+ NAME "I-6. RFC 2911 section 3.1.4: attributes-charset + attributes-natural-language"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+
+ STATUS successful-ok
+ EXPECT printer-uri-supported OF-TYPE uri WITH-ALL-VALUES "$IPP_URI_SCHEME"
+}
+
+
+# Test that bad IPP versions are not supported.
+#
+# Required by: RFC 2911 section 3.1.8
+{
+ # The name of the test...
+ NAME "I-7. RFC 2911 section 3.1.8: Unsupported IPP version 0.0"
+ VERSION 0.0
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+
+ STATUS server-error-version-not-supported
+ EXPECT !printer-uri-supported
+}
+
+
+# Test that printer operations require the printer-uri operation attribute.
+#
+# Required by: RFC 2911 section 3.2
+{
+ NAME "I-8. RFC 2911 section 3.2: No printer-uri operation attribute"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+
+ STATUS client-error-bad-request
+ EXPECT !printer-uri-supported
+}
+
+
+# Test Get-Printer-Attributes operation
+#
+# Required by: PWG 5100.14 Section 5.x
+{
+ NAME "I-9. Get-Printer-Attributes Operation (default)"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+
+ # PWG 5100.14 - Table 5 - Operations
+ EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0002 # Print-Job
+ EXPECT operations-supported WITH-VALUE 0x0004 # Validate-Job
+ EXPECT operations-supported WITH-VALUE 0x0005 # Create-Job
+ EXPECT operations-supported WITH-VALUE 0x0006 # Send-Document
+ 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 operations-supported WITH-VALUE 0x0039 # Cancel-My-Jobs
+ EXPECT operations-supported WITH-VALUE 0x003b # Close-Job
+ EXPECT operations-supported WITH-VALUE 0x003c # Identify-Printer
+
+ # PWG 5100.14 - Table 6 - Printer Description Attributes
+ 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 color-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
+ EXPECT color-supported WITH-VALUE true DEFINE-MATCH HAVE_COLOR
+
+ EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "none"
+ EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "deflate" DEFINE-MATCH HAVE_DEFLATE
+ EXPECT compression-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "gzip" DEFINE-MATCH HAVE_GZIP
+
+ 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 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 WITH-VALUE "image/jpeg"
+ EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/pwg-raster"
+ EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "application/pdf" DEFINE-MATCH HAVE_PDF
+
+ EXPECT document-password-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_PDF
+
+ EXPECT feed-orientation-supported OF-TYPE keyword IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_FEED_ORIENTATION
+ EXPECT feed-orientation-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_FEED_ORIENTATION
+
+ EXPECT finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3 DEFINE-MATCH HAVE_FINISHINGS
+ EXPECT finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag IF-DEFINED HAVE_FINISHINGS
+
+ EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag
+
+ EXPECT identify-actions-default OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(display|flash|sound|speak)$/"
+ EXPECT identify-actions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(display|flash|sound|speak)$/"
+
+ EXPECT ipp-features-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "ipp-everywhere"
+
+ EXPECT ipp-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "2.0"
+
+ EXPECT job-account-id-supported OF-TYPE boolean IN-GROUP printer-attributes-tag WITH-VALUE true COUNT 1 DEFINE-MATCH HAVE_JOB_ACCOUNT_ID
+ EXPECT job-account-id-default OF-TYPE name|no-value IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_JOB_ACCOUNT_ID
+
+ EXPECT job-accounting-user-id-supported OF-TYPE boolean IN-GROUP printer-attributes-tag WITH-VALUE true COUNT 1 DEFINE-MATCH HAVE_JOB_ACCOUNTING_USER_ID
+ EXPECT job-accounting-user-id-default OF-TYPE name|no-value IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_JOB_ACCOUNTING_USER_ID
+
+ EXPECT job-constraints-supported OF-TYPE collection IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_JOB_CONSTRAINTS
+
+ EXPECT job-creation-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^(media|print-color-mode)$$/"
+
+ EXPECT job-ids-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true
+
+ # TODO: Make job-password-xxx conditionally required
+ EXPECT ?job-password-supported OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
+ EXPECT ?job-password-encryption-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
+
+ EXPECT preferred-attributes-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
+
+ EXPECT job-resolvers-supported OF-TYPE collection IN-GROUP printer-attributes-tag IF-DEFINED HAVE_JOB_CONSTRAINTS
+
+ EXPECT media-bottom-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
+
+ # Default Get-Printer-Attributes MUST NOT return media-col-database, per PWG 5100.11 (JPS2)
+ EXPECT !media-col-database OF-TYPE collection IN-GROUP printer-attributes-tag
+
+ EXPECT media-source-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_MEDIA_SOURCE
+
+ EXPECT media-type-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_MEDIA_TYPE
+
+ EXPECT media-col-default OF-TYPE collection IN-GROUP printer-attributes-tag COUNT 1
+ EXPECT media-col-default/media-size OF-TYPE collection COUNT 1
+ EXPECT media-col-default/media-size/x-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
+ EXPECT media-col-default/media-size/y-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
+ EXPECT media-col-default/media-source OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_SOURCE
+ EXPECT media-col-default/media-type OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_TYPE
+
+ # TODO: Use EXPECT-ALL (STR #4469)
+ EXPECT media-col-ready OF-TYPE collection|no-value IN-GROUP printer-attributes-tag
+ EXPECT media-col-ready/media-size OF-TYPE collection COUNT 1
+ EXPECT media-col-ready/media-size/x-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
+ EXPECT media-col-ready/media-size/y-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
+ EXPECT media-col-ready/media-source OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_SOURCE
+ EXPECT ?media-col-ready/media-source-properties OF-TYPE collection COUNT 1
+ EXPECT media-col-ready/media-type OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_TYPE
+
+ EXPECT media-col-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
+ EXPECT media-col-supported WITH-VALUE "media-size"
+ EXPECT media-col-supported WITH-VALUE "media-source" IF-DEFINED HAVE_MEDIA_SOURCE
+ EXPECT media-col-supported WITH-VALUE "media-type" IF-DEFINED HAVE_MEDIA_TYPE
+
+ EXPECT media-default OF-TYPE no-value|keyword|name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$MEDIA_REGEX"
+ EXPECT media-default WITH-VALUE "$MEDIA_REGEX" DEFINE-VALUE DEFAULT_MEDIA
+
+ EXPECT media-left-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
+
+ EXPECT media-ready OF-TYPE keyword|name|no-value IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$MEDIA_REGEX"
+
+ EXPECT media-right-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
+
+ EXPECT media-size-supported OF-TYPE collection IN-GROUP printer-attributes-tag
+ # TODO: Use EXPECT-ALL (STR #4469)
+ EXPECT media-size-supported/x-dimension OF-TYPE integer|rangeOfInteger
+ EXPECT media-size-supported/y-dimension OF-TYPE integer|rangeOfInteger
+
+ # media-source-supported tests above to set HAVE_MEDIA_SOURCE
+
+ EXPECT media-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$MEDIA_REGEX"
+
+ EXPECT media-top-margin-supported OF-TYPE integer IN-GROUP printer-attributes-tag WITH-ALL-VALUES >-1
+
+ # media-type-supported tests above to set HAVE_MEDIA_TYPE
+
+ 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 multiple-operation-time-out-action OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(abort-job|hold-job|process-job)$/"
+
+ EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1
+
+ # operations-supported tested above for required operations
+
+ # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
+ EXPECT orientation-requested-default OF-TYPE no-value|enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5,6,7
+ EXPECT orientation-requested-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5,6,7
+
+ # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
+ EXPECT output-bin-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag COUNT 1
+ EXPECT output-bin-default DEFINE-VALUE DEFAULT_OUTPUT_BIN
+ EXPECT output-bin-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag
+
+ EXPECT overrides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "document-number" IF-DEFINED HAVE_PDF
+ EXPECT overrides-supported WITH-VALUE "pages" IF-DEFINED HAVE_PDF
+
+ EXPECT page-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true IF-DEFINED HAVE_PDF
+
+ 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 IF-DEFINED HAVE_COLOR
+ EXPECT !pages-per-minute-color IF-NOT-DEFINED HAVE_COLOR
+
+ # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
+ EXPECT print-color-mode-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(auto|auto-monochrome|bi-level|color|highlight|monochrome|process-bi-level|process-monochrome)$/"
+ EXPECT print-color-mode-default DEFINE-VALUE DEFAULT_PRINT_COLOR_MODE
+ EXPECT print-color-mode-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|auto-monochrome|bi-level|color|highlight|monochrome|process-bi-level|process-monochrome)$/"
+
+ # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
+ EXPECT print-content-optimize-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(auto|graphic|photo|text|text-and-graphic)$/"
+ EXPECT print-content-optimize-default DEFINE-VALUE DEFAULT_PRINT_CONTENT_OPTIMIZE
+ EXPECT print-content-optimize-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|graphic|photo|text|text-and-graphic)$/"
+
+ # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
+ EXPECT print-rendering-intent-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(auto|absolute|perceptual|relative|relative-bpc|saturation)$/"
+ EXPECT print-rendering-intent-default DEFINE-VALUE DEFAULT_PRINT_RENDERING_INTENT
+ EXPECT print-rendering-intent-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(auto|absolute|perceptual|relative|relative-bpc|saturation)$/"
+
+ # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
+ EXPECT print-quality-default OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
+ EXPECT print-quality-default DEFINE-VALUE DEFAULT_PRINT_QUALITY
+ EXPECT print-quality-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3,4,5
+
+ EXPECT ?printer-alert OF-TYPE octetString IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$ALERT_REGEX"
+ EXPECT ?printer-alert-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-alert
+
+ EXPECT ?printer-charge-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 DEFINE-MATCH HAVE_CHARGE_INFO
+ EXPECT printer-charge-info-uri OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED HAVE_CHARGE_INFO
+
+ EXPECT printer-config-change-date-time OF-TYPE dateTime IN-GROUP printer-attributes-tag COUNT 1
+
+ EXPECT printer-config-change-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >-1
+
+ EXPECT printer-device-id OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^([-A-Za-z ]+:[^;]*;)+$/"
+
+ EXPECT printer-geo-location OF-TYPE uri|unknown IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^geo:/"
+
+ EXPECT printer-get-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "document-format"
+
+ # TODO: Use EXPECT-ALL syntax
+ EXPECT printer-icc-profiles-supported OF-TYPE collection IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_ICC_PROFILES
+ EXPECT printer-icc-profiles-supported/profile-name OF-TYPE name COUNT 1 IF-DEFINED HAVE_ICC_PROFILES
+ EXPECT printer-icc-profiles-supported/profile-uri OF-TYPE uri COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME" IF-DEFINED HAVE_ICC_PROFILES
+
+ EXPECT printer-icons OF-TYPE uri IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$HTTP_URI_SCHEME"
+ EXPECT printer-icons OF-TYPE uri WITH-ALL-HOSTNAMES "$hostname"
+
+ EXPECT printer-info OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
+
+ EXPECT printer-is-accepting-jobs OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1
+
+ 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 WITH-VALUE "$HTTP_URI_SCHEME"
+ # EXPECT !printer-more-info WITH-HOSTNAME "$LINK_LOCAL"
+ # TODO: Provide warnings when hostname doesn't match
+
+ EXPECT printer-name OF-TYPE name IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^.{0,127}$$/"
+
+ EXPECT printer-organization OF-TYPE text IN-GROUP printer-attributes-tag
+
+ EXPECT printer-organizational-unit OF-TYPE text IN-GROUP printer-attributes-tag
+
+ # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
+ EXPECT printer-resolution-default OF-TYPE resolution IN-GROUP printer-attributes-tag COUNT 1
+ EXPECT printer-resolution-default DEFINE-VALUE DEFAULT_PRINTER_RESOLUTION
+ EXPECT printer-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
+
+ EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
+
+ EXPECT printer-state-change-date-time OF-TYPE dateTime IN-GROUP printer-attributes-tag COUNT 1
+
+ EXPECT printer-state-change-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >-1
+
+ EXPECT printer-state-message OF-TYPE text IN-GROUP printer-attributes-tag
+
+ EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag
+
+ EXPECT printer-supply OF-TYPE octetString IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$SUPPLY_REGEX"
+
+ EXPECT printer-supply-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-supply
+
+ EXPECT printer-supply-info-uri OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$HTTP_URI_SCHEME"
+ EXPECT printer-supply-info-uri WITH-HOSTNAME "$hostname"
+ # EXPECT !printer-supply-info-uri WITH-HOSTNAME "$LINK_LOCAL"
+
+ 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 WITH-ALL-VALUES "$IPP_URI_SCHEME"
+ # EXPECT !printer-uri-supported WITH-HOSTNAME "$LINK_LOCAL"
+
+ EXPECT printer-uuid OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
+
+ EXPECT pwg-raster-document-resolution-supported OF-TYPE resolution IN-GROUP printer-attributes-tag
+
+ EXPECT pwg-raster-document-sheet-back OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "/^(flipped|manual-tumble|normal|rotated)$$/"
+
+ EXPECT pwg-raster-document-type-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
+
+ EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
+
+ # TODO: Use WITH-VALUE-FROM "name-supported" syntax (STR #4470)
+ EXPECT sides-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-ALL-VALUES "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
+ EXPECT sides-default DEFINE-VALUE DEFAULT_SIDES
+ EXPECT sides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES "/^(one-sided|two-sided-long-edge|two-sided-short-edge)$$/"
+
+ 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 which-jobs-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "completed"
+ EXPECT which-jobs-supported WITH-VALUE "not-completed"
+}
+
+
+# Test Get-Printer-Attributes operation with requested-attributes
+#
+# Required by: RFC 2911 section 3.2.5, PWG 5100.11 (JPS2)
+{
+ NAME "I-10. Get-Printer-Attributes Operation (requested-attributes)"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword requested-attributes media-col-database,printer-uri-supported
+
+ STATUS successful-ok
+
+ # TODO: Use EXPECT-ALL (STR #4469)
+ EXPECT media-col-database OF-TYPE collection IN-GROUP printer-attributes-tag
+ EXPECT media-col-database/media-size OF-TYPE collection COUNT 1
+ EXPECT media-col-database/media-size/x-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
+ EXPECT media-col-database/media-size/y-dimension OF-TYPE integer COUNT 1 WITH-VALUE >0
+ EXPECT media-col-database/media-source OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_SOURCE
+ EXPECT ?media-col-database/media-source-properties OF-TYPE collection COUNT 1
+ EXPECT media-col-database/media-type OF-TYPE keyword|name COUNT 1 IF-DEFINED HAVE_MEDIA_TYPE
+
+ EXPECT !printer-name
+ EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag WITH-ALL-VALUES "$IPP_URI_SCHEME"
+}
+
+
+# Test Validate-Job operation
+#
+# Required by: RFC 2911 section 3.2.3
+{
+ NAME "I-11 Validate-Job Operation"
+ OPERATION Validate-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "color.jpg"
+ ATTR boolean ipp-attribute-fidelity false
+ ATTR name document-name "color.jpg"
+ ATTR keyword compression none
+ ATTR mimeMediaType document-format "image/jpeg"
+
+ GROUP job-attributes-tag
+ ATTR keyword media "$DEFAULT_MEDIA"
+ ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
+ ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
+ ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
+ ATTR enum print-quality $DEFAULT_PRINT_QUALITY
+ ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
+ ATTR keyword sides "one-sided"
+
+ STATUS successful-ok
+}
+
+
+# Test Print-Job operation
+#
+# Required by: RFC 2911 section 3.2.1
+{
+ NAME "I-12. Print-Job Operation (color.jpg)"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "job-color.jpg"
+ ATTR boolean ipp-attribute-fidelity false
+ ATTR name document-name "document-color.jpg"
+ ATTR keyword compression none
+ ATTR mimeMediaType document-format "image/jpeg"
+
+ GROUP job-attributes-tag
+ ATTR keyword media "$DEFAULT_MEDIA"
+ ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
+ ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
+ ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
+ ATTR enum print-quality $DEFAULT_PRINT_QUALITY
+ ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
+ ATTR keyword sides "one-sided"
+
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-job-canceled
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+
+ EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
+
+ EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0
+ EXPECT job-id DEFINE-VALUE PRINT_JOB_ID
+
+ EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE 3,4,5,6,7,8,9
+ EXPECT job-state WITH-VALUE 7,8,9 DEFINE-MATCH PRINT_JOB_COMPLETED
+
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag
+
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+}
+
+
+# Test Get-Jobs operation
+#
+# Required by: RFC 2911 section 3.2.6
+{
+ SKIP-IF-DEFINED PRINT_JOB_COMPLETED
+
+ NAME "I-13. Get-Jobs Operation (default)"
+ OPERATION Get-Jobs
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+
+ EXPECT ?job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
+ EXPECT ?job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
+ EXPECT !job-name
+ EXPECT !job-state
+}
+
+
+# Test Get-Jobs operation
+#
+# Required by: RFC 2911 section 3.2.6
+{
+ SKIP-IF-DEFINED PRINT_JOB_COMPLETED
+
+ NAME "I-14. Get-Jobs Operation (requested-attributes)"
+ OPERATION Get-Jobs
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword requested-attributes all
+
+ STATUS successful-ok
+
+ # PWG 5100.14 - Table 9 - Job Description attributes
+ EXPECT ?compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
+ EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
+ EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$user"
+ EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
+ EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<7
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+ EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
+ EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
+ EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+
+ # PWG 5100.15 - Table 8 - Job Template attributes
+ EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
+ EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?page-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag
+ EXPECT ?print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+}
+
+
+# Test Get-Jobs operation
+#
+# Required by: RFC 2911 section 3.2.6
+{
+ SKIP-IF-DEFINED PRINT_JOB_COMPLETED
+
+ NAME "I-15. Get-Jobs Operation (which-jobs=not-completed)"
+ OPERATION Get-Jobs
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword which-jobs not-completed
+
+ STATUS successful-ok
+
+ EXPECT ?job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
+ EXPECT ?job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
+ EXPECT !job-name
+ EXPECT !job-state
+}
+
+
+# Wait for job to complete...
+{
+ SKIP-IF-NOT-DEFINED PRINT_JOB_ID
+
+ NAME "I-16. Get-Job-Attributes Until Job Complete"
+ OPERATION Get-Job-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $PRINT_JOB_ID
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+ EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6 REPEAT-NO-MATCH REPEAT-LIMIT 30
+ DISPLAY job-state
+
+ # PWG 5100.14 - Table 9 - Job Description attributes
+ EXPECT compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "none"
+ EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "image/jpeg"
+ EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE ""
+ EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "document-color.jpg"
+ EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $PRINT_JOB_ID
+ EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "job-color.jpg"
+ EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
+ EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+ EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
+ EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
+ EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+
+ # PWG 5100.15 - Table 8 - Job Template attributes
+ EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "1"
+ EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
+ EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT media OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_MEDIA"
+ EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_OUTPUT_BIN"
+ EXPECT !page-ranges
+ EXPECT print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_COLOR_MODE"
+ EXPECT print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
+ EXPECT print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $DEFAULT_PRINT_QUALITY
+ EXPECT print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_RENDERING_INTENT"
+ EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINTER_RESOLUTION"
+ EXPECT sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "one-sided"
+}
+
+
+# Test Get-Jobs operation
+#
+# Required by: RFC 2911 section 3.2.6
+{
+ NAME "I-17. Get-Jobs Operation (which-jobs=completed)"
+ OPERATION Get-Jobs
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword which-jobs completed
+
+ STATUS successful-ok
+
+ # TODO: Use EXPECT-ALL/ANY syntax to check for job that was just completed
+ EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
+ EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
+ EXPECT !job-name
+ EXPECT !job-state
+}
+
+
+# Test Get-Jobs operation
+#
+# Required by: RFC 2911 section 3.2.6
+{
+ NAME "I-18. Get-Jobs Operation (which-jobs, requested-attributes)"
+ OPERATION Get-Jobs
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword requested-attributes all
+ ATTR keyword which-jobs completed
+
+ STATUS successful-ok
+
+ # PWG 5100.14 - Table 9 - Job Description attributes
+ EXPECT compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
+ EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
+ EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6,<10
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+ EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
+ EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
+ EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+
+ # PWG 5100.15 - Table 8 - Job Template attributes
+ EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
+ EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?media OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?page-ranges OF-TYPE rangeOfInteger IN-GROUP job-attributes-tag
+ EXPECT ?print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+}
+
+
+# Test Cancel-Job operation
+#
+# Required by: RFC 2911 section 3.3.3
+{
+ NAME "I-19. Cancel-Job Operation (completed job)"
+ OPERATION Cancel-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $PRINT_JOB_ID
+ ATTR name requesting-user-name $user
+
+ STATUS client-error-not-possible
+}
+
+
+# Test Print-Job operation
+#
+# Required by: RFC 2911 section 3.2.1
+{
+ NAME "I-20. Print-Job Operation (color.jpg)"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "job2-color.jpg"
+ ATTR boolean ipp-attribute-fidelity false
+ ATTR name document-name "document2-color.jpg"
+ ATTR keyword compression none
+ ATTR mimeMediaType document-format "image/jpeg"
+
+ GROUP job-attributes-tag
+ ATTR keyword media "$DEFAULT_MEDIA"
+ ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
+ ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
+ ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
+ ATTR enum print-quality $DEFAULT_PRINT_QUALITY
+ ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
+ ATTR keyword sides "one-sided"
+
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-job-canceled
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+
+ EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
+
+ EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0
+ EXPECT job-id DEFINE-VALUE PRINT_JOB2_ID
+
+ EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE 3,4,5,6,7,8,9
+
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag
+
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+}
+
+
+# Test Cancel-Job operation
+#
+# Required by: RFC 2911 section 3.3.3
+{
+ NAME "I-21. Cancel-Job Operation (pending/processing job)"
+ OPERATION Cancel-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $PRINT_JOB2_ID
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+ STATUS client-error-not-possible
+}
+
+
+# Test Get-Job-Attributes operation
+#
+# Required by: RFC 2911 section 3.3.4
+{
+ NAME "I-22. Get-Job-Attributes Operation"
+ OPERATION Get-Job-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $PRINT_JOB2_ID
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+
+ # PWG 5100.14 - Table 9 - Job Description attributes
+ EXPECT compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "none"
+ EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "image/jpeg"
+ EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE ""
+ EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "document2-color.jpg"
+ EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $PRINT_JOB2_ID
+ EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "job2-color.jpg"
+ EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
+ EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6,<10
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+ EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
+ EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
+ EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+
+ # PWG 5100.15 - Table 8 - Job Template attributes
+ EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "1"
+ EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
+ EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT media OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_MEDIA"
+ EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_OUTPUT_BIN"
+ EXPECT !page-ranges
+ EXPECT print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_COLOR_MODE"
+ EXPECT print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
+ EXPECT print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $DEFAULT_PRINT_QUALITY
+ EXPECT print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_RENDERING_INTENT"
+ EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINTER_RESOLUTION"
+ EXPECT sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "one-sided"
+}
+
+
+# Test Create-Job and Send-Document operations
+#
+# Defined by: RFC 2911 section 3.2.4 and 3.3.1
+{
+ NAME "I-23. Create-Job Operation"
+ OPERATION Create-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "job3-color.jpg"
+ ATTR boolean ipp-attribute-fidelity false
+
+ GROUP job-attributes-tag
+ ATTR keyword media "$DEFAULT_MEDIA"
+ ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
+ ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
+ ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
+ ATTR enum print-quality $DEFAULT_PRINT_QUALITY
+ ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
+ ATTR keyword sides "one-sided"
+
+ STATUS successful-ok
+ STATUS server-error-job-canceled
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+
+ EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
+
+ EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0
+ EXPECT job-id DEFINE-VALUE PRINT_JOB3_ID
+
+ EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE 3,4,5,6
+
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag
+
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+}
+
+{
+ SKIP-IF-NOT-DEFINED PRINT_JOB3_ID
+
+ NAME "I-24. Send-Document Operation (color.jpg)"
+ OPERATION Send-Document
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $PRINT_JOB3_ID
+ ATTR name requesting-user-name $user
+ ATTR boolean last-document true
+ ATTR name document-name "document3-color.jpg"
+ ATTR keyword compression none
+ ATTR mimeMediaType document-format "image/jpeg"
+
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-job-canceled
+}
+
+
+# Wait for job to complete...
+{
+ SKIP-IF-NOT-DEFINED PRINT_JOB3_ID
+
+ NAME "I-25. Get-Job-Attributes Until Job Complete"
+ OPERATION Get-Job-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR integer job-id $PRINT_JOB3_ID
+ ATTR name requesting-user-name $user
+
+ STATUS successful-ok
+ EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6 REPEAT-NO-MATCH REPEAT-LIMIT 30
+ DISPLAY job-state
+
+ # PWG 5100.14 - Table 9 - Job Description attributes
+ EXPECT compression-supplied OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "none"
+ EXPECT date-time-at-completed OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-creation OF-TYPE dateTime IN-GROUP job-attributes-tag COUNT 1
+ EXPECT date-time-at-processing OF-TYPE dateTime|no-value IN-GROUP job-attributes-tag COUNT 1
+ EXPECT document-format-supplied OF-TYPE mimeMediaType|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "image/jpeg"
+ EXPECT ?document-format-version-supplied OF-TYPE text IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE ""
+ EXPECT document-name-supplied OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "document3-color.jpg"
+ EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $PRINT_JOB3_ID
+ EXPECT job-impressions OF-TYPE integer|no-value IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-impressions-completed OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "job3-color.jpg"
+ EXPECT job-originating-user-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-printer-up-time OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$uri"
+ EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >2,<10
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag COUNT 1
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+ EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
+ EXPECT job-uuid OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$UUID_URI"
+ EXPECT time-at-completed OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-creation OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+ EXPECT time-at-processing OF-TYPE no-value|integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >-1
+
+ # PWG 5100.15 - Table 8 - Job Template attributes
+ EXPECT ?copies OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "1"
+ EXPECT ?feed-orientation OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?finishings OF-TYPE enum IN-GROUP job-attributes-tag
+ EXPECT ?job-account-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?job-accounting-user-id OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
+ EXPECT media OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_MEDIA"
+ EXPECT ?media-col OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?multiple-document-handling OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?orientation-requested OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1
+ EXPECT ?output-bin OF-TYPE keyword|name IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_OUTPUT_BIN"
+ EXPECT !page-ranges
+ EXPECT print-color-mode OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_COLOR_MODE"
+ EXPECT print-content-optimize OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
+ EXPECT print-quality OF-TYPE enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE $DEFAULT_PRINT_QUALITY
+ EXPECT print-rendering-intent OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINT_RENDERING_INTENT"
+ EXPECT printer-resolution OF-TYPE resolution IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$DEFAULT_PRINTER_RESOLUTION"
+ EXPECT sides OF-TYPE keyword IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "one-sided"
+}
+
+
+# Test 'media-empty' reason
+{
+ PAUSE "Remove media from printer."
+
+ NAME "I-26. Media Empty: Printer correctly reports 'media-empty' when at least one removable tray is empty (MUST NOT be a manual feed or bypass tray)"
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword requested-attributes "printer-state-reasons"
+
+ STATUS successful-ok
+
+ EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^media-empty/"
+ EXPECT !printer-state
+}
+
+
+# Test Print-Job operation
+#
+# Required by: RFC 2911 section 3.2.1
+{
+ NAME "I-27. Print-Job Operation (color.jpg)"
+ OPERATION Print-Job
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR name job-name "job4-color.jpg"
+ ATTR boolean ipp-attribute-fidelity false
+ ATTR name document-name "document4-color.jpg"
+ ATTR keyword compression none
+ ATTR mimeMediaType document-format "image/jpeg"
+
+ GROUP job-attributes-tag
+ ATTR keyword media "$DEFAULT_MEDIA"
+ ATTR keyword print-color-mode "$DEFAULT_PRINT_COLOR_MODE"
+ ATTR keyword print-content-optimize "$DEFAULT_PRINT_CONTENT_OPTIMIZE"
+ ATTR keyword print-rendering-intent "$DEFAULT_PRINT_RENDERING_INTENT"
+ ATTR enum print-quality $DEFAULT_PRINT_QUALITY
+ ATTR resolution printer-resolution $DEFAULT_PRINTER_RESOLUTION
+ ATTR keyword sides "one-sided"
+
+ FILE "color.jpg"
+
+ STATUS successful-ok
+ STATUS server-error-job-canceled
+ STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
+
+ EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
+
+ EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE >0
+ EXPECT job-id DEFINE-VALUE PRINT_JOB4_ID
+
+ EXPECT job-state OF-TYPE unknown|enum COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE 3,4,5,6,7,8,9
+ EXPECT job-state WITH-VALUE 7,8,9 DEFINE-MATCH PRINT_JOB_COMPLETED
+
+ EXPECT job-state-message OF-TYPE text IN-GROUP job-attributes-tag
+
+ EXPECT job-state-reasons OF-TYPE keyword IN-GROUP job-attributes-tag
+}
+
+
+# Test 'media-needed' reason
+{
+ NAME "I-28. Media Needed: Printer correctly reports 'media-needed' when a job is queued."
+ OPERATION Get-Printer-Attributes
+ GROUP operation-attributes-tag
+ ATTR charset attributes-charset utf-8
+ ATTR naturalLanguage attributes-natural-language en
+ ATTR uri printer-uri $uri
+ ATTR name requesting-user-name $user
+ ATTR keyword requested-attributes "printer-state-reasons"
+
+ STATUS successful-ok
+
+ EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "/^media-needed/"
+ EXPECT !printer-state
+}
+
+
+
+
+#
+# End of "$Id: ipp-tests.test 12690 2015-06-04 16:34:20Z msweet $".
+#
--- /dev/null
+#!/bin/sh
+#
+# "$Id: make-ippeveselfcert.sh 12130 2014-08-28 22:40:36Z msweet $"
+#
+# Make an IPP Everywhere Printer self-certification package.
+#
+# Copyright 2014 The Printer Working Group.
+# Copyright 2007-2013 by Apple Inc.
+# Copyright 1997-2007 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/".
+#
+
+# Make sure we are running in the right directory...
+if test ! -f everywhere/make-ippeveselfcert.sh; then
+ echo "Run this script from the top-level CUPS source directory, e.g.:"
+ echo ""
+ echo " everywhere/make-ippeveselfcert.sh $*"
+ echo ""
+ exit 1
+fi
+
+if test $# != 2; then
+ echo "Usage: everywhere/make-ippeveselfcert.sh platform YYYYMMDD"
+ exit 1
+fi
+
+platform="$1"
+fileversion="$2"
+
+echo Creating package directory...
+pkgdir="sw-ippeveselfcert10-$fileversion"
+
+test -d $pkgdir && rm -r $pkgdir
+mkdir $pkgdir || exit 1
+
+echo Copying package files
+cp LICENSE.txt $pkgdir
+cp doc/help/man-ipp*.html $pkgdir
+cp everywhere/README.txt $pkgdir
+cp everywhere/man-ippserver.html $pkgdir
+cp everywhere/*-tests.* $pkgdir
+cp test/color.jpg $pkgdir
+cp test/document-*.pdf $pkgdir
+cp test/ippfind-static $pkgdir/ippfind
+cp test/ippserver $pkgdir
+cp test/ipptool-static $pkgdir/ipptool
+cp test/printer.png $pkgdir
+
+if test x$platform = xosx; then
+ pkgfile="$pkgdir-osx.dmg"
+ echo Creating disk image $pkgfile...
+ test -f $pkgfile && rm $pkgfile
+ hdiutil create -srcfolder $pkgdir $pkgfile
+else
+ pkgfile="$pkgdir-$platform.tar.gz"
+ echo Creating archive $pkgfile...
+ tar czf $pkgfile $pkgdir || exit 1
+fi
+
+echo Removing temporary files...
+rm -r $pkgdir
+
+echo Done.
+
+#
+# End of "$Id: make-ippeveselfcert.sh 12130 2014-08-28 22:40:36Z msweet $".
+#
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+<!-- SECTION: Man Pages -->
+<head>
+ <link rel="stylesheet" type="text/css" href="../cups-printable.css">
+ <title>ippserver(1)</title>
+</head>
+<body>
+<h1 class="title">ippserver(1)</h1>
+<h2 class="title"><a name="NAME">Name</a></h2>
+ippserver - a simple internet printing protocol server
+<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
+<b>ippserver</b>
+[
+<b>-2</b>
+] [
+<b>-M</b>
+<i>manufacturer</i>
+] [
+<b>-P</b>
+] [
+<b>-c</b>
+<i>command</i>
+] [
+<b>-d</b>
+<i>spool-directory</i>
+] [
+<b>-f</b>
+<i>type/subtype[,...]</i>
+] [
+<b>-h</b>
+] [
+<b>-i</b>
+<i>iconfile.png</i>
+] [
+<b>-k</b>
+] [
+<b>-l</b>
+<i>location</i>
+] [
+<b>-m</b>
+<i>model</i>
+] [
+<b>-n</b>
+<i>hostname</i>
+] [
+<b>-p</b>
+<i>port</i>
+] [
+<b>-r</b>
+<i>subtype</i>
+] [
+<b>-s</b>
+<i>speed[,color-speed]</i>
+] [
+<b>-v[vvv]</b>
+]
+<i>service-name</i>
+<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
+<b>ippserver</b>
+is a simple Internet Printing Protocol (IPP) server conforming to the IPP Everywhere (PWG 5100.14) specification. It can be used to test client software or act as a very basic print server that runs a command for every job that is printed.
+<h2 class="title"><a name="OPTIONS">Options</a></h2>
+The following options are recognized by
+<b>ippserver:</b>
+<dl class="man">
+<dt><b>-2</b>
+<dd style="margin-left: 5.0em">Report support for two-sided (duplex) printing.
+<dt><b>-M </b><i>manufacturer</i>
+<dd style="margin-left: 5.0em">Set the manufacturer of the printer.
+The default is "Test".
+<dt><b>-P</b>
+<dd style="margin-left: 5.0em">Report support for PIN printing.
+<dt><b>-c </b><i>command</i>
+<dd style="margin-left: 5.0em">Run the specified command for each document that is printed.
+<dt><b>-d </b><i>spool-directory</i>
+<dd style="margin-left: 5.0em">Specifies the directory that will hold the print files.
+The default is a directory under the user's current temporary directory.
+<dt><b>-f </b><i>type/subtype[,...]</i>
+<dd style="margin-left: 5.0em">Specifies a list of MIME media types that the server will accept.
+The default is "application/pdf,image/jpeg,image/pwg-raster".
+<dt><b>-h</b>
+<dd style="margin-left: 5.0em">Shows program help.
+<dt><b>-i </b><i>iconfile.png</i>
+<dd style="margin-left: 5.0em">Specifies the printer icon file for the server.
+The default is "printer.png".
+<dt><b>-k</b>
+<dd style="margin-left: 5.0em">Keeps the print documents in the spool directory rather than deleting them.
+<dt><b>-l </b><i>location</i>
+<dd style="margin-left: 5.0em">Specifies the human-readable location string that is reported by the server.
+The default is the empty string.
+<dt><b>-m </b><i>model</i>
+<dd style="margin-left: 5.0em">Specifies the model name of the printer.
+The default is "Printer".
+<dt><b>-n </b><i>hostname</i>
+<dd style="margin-left: 5.0em">Specifies the hostname that is reported by the server.
+The default is the name returned by the
+<b>hostname</b>(1)
+command.
+<dt><b>-p </b><i>port</i>
+<dd style="margin-left: 5.0em">Specifies the port number to listen on.
+The default is a user-specific number from 8000 to 8999.
+<dt><b>-r </b><i>subtype</i>
+<dd style="margin-left: 5.0em">Specifies the Bonjour subtype(s) to advertise.
+Separate multiple subtypes with a comma.
+The default is "_print".
+<dt><b>-s </b><i>speed[,color-speed]</i>
+<dd style="margin-left: 5.0em">Specifies the printer speed in pages per minute.
+If two numbers are specified and the second number is greater than zero, the server will report support for color printing.
+The default is "10,0".
+<dt><b>-v[vvv]</b>
+<dd style="margin-left: 5.0em">Be (very) verbose when logging activity to the standard output.
+</dl>
+<h2 class="title"><a name="EXIT_STATUS">Exit Status</a></h2>
+The
+<b>ippserver</b>
+program returns 1 if it is unable to process the command-line arguments or register the IPP service.
+Otherwise
+<b>ippserver</b>
+will run continuously until terminated.
+<h2 class="title"><a name="CONFORMING_TO">Conforming To</a></h2>
+The
+<b>ippserver</b>
+program is unique to CUPS and conforms to the IPP Everywhere (PWG 5100.14) specification.
+<h2 class="title"><a name="ENVIRONMENT">Environment</a></h2>
+<b>ippserver</b>
+adds environment variables starting with "IPP_" for all IPP Job attributes in the print request.
+For example, when executing a command for an IPP Job containing the "media" Job Template attribute, the "IPP_MEDIA" environment variable will be set to the value of that attribute.
+<p>Enumerated values are converted to their keyword equivalents.
+For example, a "print-quality" Job Template attribute with a enum value of 3 will become the "IPP_PRINT_QUALITY" environment variable with a value of "draft".
+<h2 class="title"><a name="EXAMPLES">Examples</a></h2>
+Run
+<b>ippserver</b>
+with a service name of My Cool Printer:
+<pre class="man">
+
+ ippserver "My Cool Printer"
+</pre>
+<p>Run the
+<b>file</b>(1)
+command whenever a job is sent to the server:
+<pre class="man">
+
+ ippserver -c file "My Cool Printer"
+</pre>
+<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
+PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp">http://www.pwg.org/ipp</a>)
+<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
+Copyright © 2007-2014 by Apple Inc.
+
+</body>
+</html>
.\"
-.\" "$Id: cupsd.man.in 12854 2015-08-28 14:08:00Z msweet $"
+.\" "$Id: cupsd.man.in 13087 2016-02-12 18:53:24Z msweet $"
.\"
.\" cupsd man page for CUPS.
.\"
-.\" Copyright 2007-2014 by Apple Inc.
+.\" Copyright 2007-2016 by Apple Inc.
.\" Copyright 1997-2006 by Easy Software Products.
.\"
.\" These coded instructions, statements, and computer programs are the
.\" 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 cupsd 8 "CUPS" "8 July 2014" "Apple Inc."
+.TH cupsd 8 "CUPS" "12 February 2016" "Apple Inc."
.SH NAME
cupsd \- cups scheduler
.SH SYNOPSIS
.B cupsd
[
.B \-c
-.I config-file
+.I cupsd.conf
] [
.B \-f
] [
] [
.B \-h
] [
-.B -l
+.B \-l
+] [
+.B \-s
+.I cups-files.conf
] [
-.B -t
+.B \-t
]
.SH DESCRIPTION
.B cupsd
-is the scheduler for CUPS. It implements a printing system based upon the Internet Printing Protocol, version 2.1. If no options are specified on the command-line then the default configuration file
+is the scheduler for CUPS. It implements a printing system based upon the Internet Printing Protocol, version 2.1, and supports most of the requirements for IPP Everywhere. If no options are specified on the command-line then the default configuration file
.I /etc/cups/cupsd.conf
will be used.
.SH OPTIONS
.TP 5
-.BI \-c \ config-file
-Uses the named configuration file.
+.BI \-c \ cupsd.conf
+Uses the named cupsd.conf configuration file.
.TP 5
.B \-f
Run
or
.BR systemd (8).
.TP 5
+.BI \-s \ cups-files.conf
+Uses the named cups-files.conf configuration file.
+.TP 5
.B \-t
Test the configuration file for syntax errors.
.SH FILES
.BR backend (7),
.BR classes.conf (5),
.BR cups (1),
+.BR cups-files.conf (5),
.BR cups-lpd (8),
.BR cupsd.conf (5),
.BR cupsd-helper (8),
.BR systemd (8),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2015 by Apple Inc.
+Copyright \[co] 2007-2016 by Apple Inc.
.\"
-.\" End of "$Id: cupsd.man.in 12854 2015-08-28 14:08:00Z msweet $".
+.\" End of "$Id: cupsd.man.in 13087 2016-02-12 18:53:24Z msweet $".
.\"
.\"
-.\" "$Id: ppdcfile.man 12854 2015-08-28 14:08:00Z msweet $"
+.\" "$Id: ppdcfile.man 13117 2016-03-07 18:36:16Z msweet $"
.\"
.\" ppdcfile man page for CUPS.
.\"
-.\" Copyright 2007-2014 by Apple Inc.
+.\" Copyright 2007-2016 by Apple Inc.
.\" Copyright 1997-2007 by Easy Software Products.
.\"
.\" These coded instructions, statements, and computer programs are the
.\" 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 ppdcfile 5 "CUPS" "12 June 2014" "Apple Inc."
+.TH ppdcfile 5 "CUPS" "5 March 2016" "Apple Inc."
.SH NAME
ppdcfile \- cups ppd compiler source file format
.SH DESCRIPTION
.TP 5
\fBDuplex \fItype\fR
.TP 5
-\fBFilter \Imime-type cost program\fR
+\fBFilter \fImime-type cost program\fR
.TP 5
\fBFinishing \fIname\fR
.TP 5
.SH COPYRIGHT
Copyright \[co] 2007-2015 by Apple Inc.
.\"
-.\" End of "$Id: ppdcfile.man 12854 2015-08-28 14:08:00Z msweet $".
+.\" End of "$Id: ppdcfile.man 13117 2016-03-07 18:36:16Z msweet $".
.\"
/*
- * "$Id: main.c 13040 2016-01-11 20:29:13Z msweet $"
+ * "$Id: main.c 13087 2016-02-12 18:53:24Z msweet $"
*
* Main loop for the CUPS scheduler.
*
_cupsLangPuts(fp, _("Options:"));
_cupsLangPuts(fp, _(" -c cupsd.conf Set cupsd.conf file to use."));
_cupsLangPuts(fp, _(" -f Run in the foreground."));
- _cupsLangPuts(fp, _(" -F Run in the foreground but "
- "detach from console."));
+ _cupsLangPuts(fp, _(" -F Run in the foreground but detach from console."));
_cupsLangPuts(fp, _(" -h Show this usage message."));
_cupsLangPuts(fp, _(" -l Run cupsd on demand."));
- _cupsLangPuts(fp, _(" -t Test the configuration "
- "file."));
+ _cupsLangPuts(fp, _(" -s cups-files.conf Set cups-files.conf file to use."));
+ _cupsLangPuts(fp, _(" -t Test the configuration file."));
exit(status);
}
/*
- * End of "$Id: main.c 13040 2016-01-11 20:29:13Z msweet $".
+ * End of "$Id: main.c 13087 2016-02-12 18:53:24Z msweet $".
*/
--- /dev/null
+#!/bin/sh
+#
+# Check for global symbols that don't need to be made global...
+#
+
+for file in *.o; do
+ functions=""
+
+ for function in `nm -g $file | grep "T " | awk '{print $3}'`; do
+ found=""
+ for file2 in *.o; do
+ if test "$file" = "$file2"; then
+ continue;
+ fi
+
+ found=`nm -g $file2 | grep $function`
+ if test "$found" != ""; then
+ break;
+ fi
+ done
+
+ if test -z "$found"; then
+ functions="$functions $function"
+ fi
+ done
+
+ if test -z "$functions"; then
+ echo "$file: OK"
+ else
+ echo "$file: $functions"
+ fi
+done
--- /dev/null
+#!/bin/sh
+#
+# List public API symbols...
+#
+
+for function in `nm -g *.so | grep "T " | awk '{print $3}' | grep -v '^_' | sort`; do
+ found=`grep $function\( *.h | grep -v DEPRECATED`
+
+ if test "x$found" != x; then
+ echo $function
+ fi
+done
--- /dev/null
+#!/bin/sh
+#
+# "$Id: makeipptoolpkg 11207 2013-07-31 18:18:52Z msweet $"
+#
+# Make an ipptool package for CUPS.
+#
+# Copyright 2007-2013 by Apple Inc.
+# Copyright 1997-2007 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/".
+#
+
+# Make sure we are running in the right directory...
+if test ! -f tools/makeipptoolpkg; then
+ echo "Run this script from the top-level CUPS source directory, e.g.:"
+ echo ""
+ echo " tools/makeipptoolpkg $*"
+ echo ""
+ exit 1
+fi
+
+platform="`uname | awk '{print tolower($1)}'`"
+case "x$1" in
+ xfedora* | xlsb | xrhel* | xubuntu*)
+ platform="linux-$1"
+ shift
+ ;;
+esac
+
+if test $# = 0; then
+ echo Updating to get snapshot version...
+ svn up
+ rev=`svn info . | grep Revision | awk '{print $2}'`
+ fileversion="`date '+%Y%m%d'`-r$rev"
+else
+ fileversion=$1
+fi
+
+if (svn st | grep -qv '^\?'); then
+ echo Local changes remain:
+ svn st | grep -v '^\?'
+ exit 1
+fi
+
+echo Creating package directory...
+pkgdir="ipptool-$fileversion"
+
+test -d $pkgdir && rm -r $pkgdir
+mkdir $pkgdir || exit 1
+
+echo Copying package files
+cp CHANGES-IPPTOOL.txt IPPTOOL.txt LICENSE.txt $pkgdir
+cp doc/help/man-ipp*.html $pkgdir
+cp test/color.jpg $pkgdir
+cp test/create-printer-subscription.test $pkgdir
+cp test/document-*.pdf $pkgdir
+cp test/document-*.ps $pkgdir
+cp test/get-completed-jobs.test test/get-jobs.test $pkgdir
+cp test/get-notifications.test $pkgdir
+cp test/get-printer-attributes.test $pkgdir
+cp test/get-subscriptions.test $pkgdir
+cp test/gray.jpg $pkgdir
+cp test/ipp-[12].*.test $pkgdir
+cp test/ipp-everywhere.test $pkgdir
+cp test/ippfind-static $pkgdir/ippfind
+cp test/ipptool-static $pkgdir/ipptool
+cp test/onepage-*.pdf $pkgdir
+cp test/onepage-*.ps $pkgdir
+cp test/print-job.test $pkgdir
+cp test/print-job-deflate.test $pkgdir
+cp test/print-job-gzip.test $pkgdir
+cp test/testfile.* $pkgdir
+cp test/validate-job.test $pkgdir
+
+if test x$platform = xdarwin; then
+ pkgfile="$pkgdir-osx-universal.dmg"
+ echo Creating disk image $pkgfile...
+ test -f $pkgfile && rm $pkgfile
+ hdiutil create -srcfolder $pkgdir $pkgfile
+else
+ pkgfile="$pkgdir-$platform-`uname -m`.tar.gz"
+ echo Creating archive $pkgfile...
+ tar czf $pkgfile $pkgdir || exit 1
+fi
+
+echo Removing temporary files...
+rm -r $pkgdir
+
+echo Done.
+
+#
+# End of "$Id: makeipptoolpkg 11207 2013-07-31 18:18:52Z msweet $".
+#
--- /dev/null
+#!/bin/sh
+#
+# "$Id: makesrcdist 12998 2015-12-02 15:09:04Z msweet $"
+#
+# makesrcdist - make a source distribution of CUPS.
+#
+
+# Make sure we are running in the right directory...
+if test ! -f tools/makesrcdist; then
+ echo "Run this script from the top-level CUPS source directory, e.g.:"
+ echo ""
+ echo " tools/makesrcdist $*"
+ echo ""
+ exit 1
+fi
+
+# Figure out the proper echo options...
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ ac_n=-n
+ ac_c=
+else
+ ac_n=
+ ac_c='\c'
+fi
+
+# See if we have local changes (other than this script...)
+if (svn st | grep -v makesrcdist | grep -qv '^\?'); then
+ echo Local changes remain:
+ svn st | grep -v makesrcdist | grep -v '^\?'
+ exit 1
+fi
+
+# Prep for snapshot or version release...
+if test $# = 0; then
+ echo Updating for snapshot...
+ svn up
+
+ # Compute version for snapshot
+ rev=`svn info . | grep Revision: | awk '{print $2}'`
+ version="2.1svn"
+ revision="-r$rev"
+ fileversion="2.1svn-r$rev"
+ fileurl="http://www.cups.org/software/test/cups-$fileversion-source.tar."
+ url="."
+else
+ # Use version from command-line
+ rev="1"
+ version=$1
+ revision=""
+ fileversion=$1
+ fileurl="http://www.cups.org/software/$version/cups-$fileversion-source.tar."
+ url="svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-$version"
+
+ echo Validating sources...
+ cupsversionpatch=`echo $version | awk -F. '{if (NF == 3) { print $3 } else { print "0" } }'`
+ cupsversion=`printf "2.01%02d" $cupsversionpatch`
+
+ temp=`grep CUPS_VERSION cups/cups.h | grep -v CUPS_VERSION_ | awk '{print $4}'`
+ if test "$temp" != $cupsversion; then
+ echo "Still need to update CUPS_VERSION to $cupsversion in cups/cups.h (saw $temp)"
+ exit 1
+ fi
+
+ temp=`grep CUPS_VERSION_PATCH cups/cups.h | awk '{print $4}'`
+ if test "$temp" != $cupsversionpatch; then
+ echo "Still need to update CUPS_VERSION_PATCH to $cupsversionpatch in cups/cups.h (saw $temp)"
+ exit 1
+ fi
+
+ temp=`head -1 README.txt | awk '{print $4}'`
+ if test "$temp" != "v$version"; then
+ echo "Still need to update version to v$version in README.txt (saw $temp)"
+ exit 1
+ fi
+
+ temp=`head -1 INSTALL.txt | awk '{print $4}'`
+ if test "$temp" != "v$version"; then
+ echo "Still need to update version to v$version in INSTALL.txt (saw $temp)"
+ exit 1
+ fi
+
+ temp=`head -4 CHANGES.txt | grep "CHANGES IN" | awk '{print $4}'`
+ if test "$temp" != "V$version"; then
+ echo "Still need to add CHANGES IN V$version in CHANGES.txt (saw $temp)"
+ exit 1
+ fi
+
+ echo Creating tag for release...
+ svn copy svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-2.1 "$url" \
+ -m "Tag $version" || exit 1
+fi
+
+fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
+
+TMPDIR="${TMPDIR:=/tmp}"
+
+echo Exporting $fileversion...
+rm -rf $TMPDIR/cups-$version
+svn export $url $TMPDIR/cups-$version
+
+echo Updating version information...
+cd $TMPDIR/cups-$version/config-scripts
+
+sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$version'/' \
+ -e '1,$s/^CUPS_REVISION=.*/CUPS_REVISION='$revision'/' \
+ <cups-common.m4 >cups-common.m4.new
+mv cups-common.m4.new cups-common.m4
+cd ..
+
+echo Configuring...
+autoconf -f
+rm -rf autom4te*.cache
+rm -rf everywhere
+rm -rf tools
+cd ..
+
+echo $ac_n Archiving...gz$ac_c
+sed -e '1,$s/@CUPS_VERSION@/'$version'/' \
+ -e '1,$s/^Release:.*/Release: '$rev'/' \
+ -e '1,$s/^Source:.*/Source: '$fileurl'gz/' \
+ <cups-$version/packaging/cups.spec.in \
+ >cups-$version/packaging/cups.spec
+tar czf cups-$fileversion-source.tar.gz cups-$version
+
+echo $ac_n ...bz2$ac_c
+sed -e '1,$s/@CUPS_VERSION@/'$version'/' \
+ -e '1,$s/^Release:.*/Release: '$rev'/' \
+ -e '1,$s/^Source:.*/Source: '$fileurl'bz2/' \
+ <cups-$version/packaging/cups.spec.in \
+ >cups-$version/packaging/cups.spec
+tar cjf cups-$fileversion-source.tar.bz2 cups-$version
+echo "..."
+
+if test -x /usr/bin/md5sum; then
+ md5sum cups-$fileversion-source.tar.{bz2,gz} | awk '{print $1, "'$fileversion' '$fileversion'/" $2}'
+elif test -x /sbin/md5; then
+ md5 cups-$fileversion-source.tar.{bz2,gz} | awk '{print $4, "'$fileversion' '$fileversion'/" substr($2, 2, length($2) - 2)}'
+fi
+
+for file in cups-$fileversion-source.tar.{bz2,gz}; do
+ test -f $file.sig && rm -f $file.sig
+ gpg --detach-sign $file
+done
+
+echo Removing temporary files...
+rm -rf cups-$version
+
+echo "Done - files in $TMPDIR."
+
+#
+# End of "$Id: makesrcdist 12998 2015-12-02 15:09:04Z msweet $".
+#
--- /dev/null
+#!/bin/sh
+#
+# Script to simulate Xpdf/Poppler's pdftops program.
+#
+
+options=""
+
+while test $# -gt 0; do
+ option="$1"
+ shift
+
+ case "$option" in
+ -expand)
+ options="$options fit-to-page"
+ ;;
+ -h)
+ echo "Usage: pdftops [options] filename"
+ echo "Options:"
+ echo " -expand"
+ echo " -h"
+ echo " -level1"
+ echo " -level2"
+ echo " -level3"
+ echo " -noembtt"
+ echo " -origpagesizes"
+ echo " -paperw width-points"
+ echo " -paperh length-points"
+ echo ""
+ echo "THIS IS A COMPATIBILITY WRAPPER"
+ exit 0
+ ;;
+ -paperw | -paperh)
+ # Ignore width/length in points
+ shift
+ ;;
+ -*)
+ # Ignore everything else
+ ;;
+ *)
+ /usr/libexec/cups/filter/cgpdftops job user title 1 "$options" "$option"
+ exit $?
+ ;;
+ esac
+done
--- /dev/null
+#!/usr/bin/php -f
+<?php
+
+$fp = popen("zgrep '^\\*Product:' /Library/Printers/PPDs/Contents/Resources/*.gz", "r");
+$files = array();
+$maxlen = 0;
+
+while ($line = fgets($fp, 1024))
+{
+ $data = explode(":", $line);
+ if (array_key_exists($data[0], $files))
+ $files[$data[0]] ++;
+ else
+ $files[$data[0]] = 1;
+
+ $data = explode("\"", $line);
+ if (strlen($data[1]) > $maxlen)
+ $maxlen = strlen($data[1]);
+}
+
+pclose($fp);
+
+arsort($files);
+
+$current_count = 0;
+$current_files = 0;
+
+foreach ($files as $file => $count)
+{
+ if ($current_count == 0)
+ print(basename($file) . " => $count products\n");
+
+ if ($count != $current_count)
+ {
+ if ($current_count != 0)
+ print("$current_files PPDs with $current_count products.\n");
+
+ $current_count = $count;
+ $current_files = 1;
+ }
+ else
+ $current_files ++;
+}
+
+if ($current_count != 0)
+ print("$current_files PPDs with $current_count products.\n");
+
+print("Maximum length of Product string: $maxlen\n");
+
+?>
--- /dev/null
+/*
+ * Simple test program that lists the Back to My Mac domains on a Mac.
+ *
+ * Compile with:
+ *
+ * clang -o testbtmm -g testbtmm.c -framework SystemConfiguration -framework CoreFoundation
+ */
+
+#include <stdio.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <SystemConfiguration/SystemConfiguration.h>
+
+
+/*
+ * 'dnssdAddAlias()' - Add a DNS-SD alias name.
+ */
+
+static void
+show_domain(const void *key, /* I - Key */
+ const void *value, /* I - Value (domain) */
+ void *context) /* I - Unused */
+{
+ char valueStr[1024]; /* Domain string */
+
+
+ (void)key;
+ (void)context;
+
+ if (CFGetTypeID((CFStringRef)value) == CFStringGetTypeID() &&
+ CFStringGetCString((CFStringRef)value, valueStr, sizeof(valueStr),
+ kCFStringEncodingUTF8))
+ printf("Back to My Mac domain: \"%s\"\n", valueStr);
+ else
+ puts("Bad Back to My Mac domain in dynamic store.");
+}
+
+
+int
+main(void)
+{
+ SCDynamicStoreRef sc; /* Context for dynamic store */
+ CFDictionaryRef btmm; /* Back-to-My-Mac domains */
+
+
+ sc = SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("cups"), NULL, NULL);
+
+ if (!sc)
+ {
+ puts("Unable to open dynamic store.");
+ exit(1);
+ }
+
+ btmm = SCDynamicStoreCopyValue(sc, CFSTR("Setup:/Network/BackToMyMac"));
+ if (btmm && CFGetTypeID(btmm) == CFDictionaryGetTypeID())
+ {
+ printf("%d Back to My Mac domains.\n", (int)CFDictionaryGetCount(btmm));
+ CFDictionaryApplyFunction(btmm, show_domain, NULL);
+ }
+ else if (btmm)
+ puts("Bad Back to My Mac data in dynamic store.");
+ else
+ puts("No Back to My Mac domains.");
+
+ return (1);
+}
--- /dev/null
+#!/bin/sh
+# Make sure we are running in the right directory...
+if test ! -f tools/testosx; then
+ echo "Run this script from the top-level CUPS source directory, e.g.:"
+ echo ""
+ echo " sudo tools/testosx [version]"
+ echo ""
+ exit 1
+fi
+
+if test `whoami` != root; then
+ echo "Run this script with sudo, e.g.:"
+ echo ""
+ echo " sudo tools/testosx [version]"
+ echo ""
+ exit 1
+fi
+
+# Get the current working copy version...
+rev=`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[a-zA-Z]*//g'`
+
+if test $# = 0; then
+ version="1.5svn-r$rev"
+else
+ version=$1
+fi
+
+# Setup an install directory...
+user=`whoami`
+topdir=`pwd`
+pkgdir="/tmp/cups.pkg-$user"
+
+echo Building package using temp directory $pkgdir...
+rm -rf $pkgdir
+mkdir -p $pkgdir/Package
+mkdir -p $pkgdir/Resources
+
+# Install resource files into the Resources directory...
+echo Installing resource files...
+cp packaging/LICENSE.rtf $pkgdir/Resources/ReadMe.rtf
+sed -e '1,$s/@CUPS_VERSION@/'$version'/g' \
+ <packaging/WELCOME.rtf >$pkgdir/Resources/Welcome.rtf
+cp packaging/installer.tif $pkgdir/Resources/background.tif
+
+if test -x /bin/launchctl; then
+ cat >$pkgdir/Resources/preflight <<EOF
+#!/bin/sh
+# Tell launchd to stop cupsd...
+if test "x`whoami`" = xroot; then
+ sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
+ sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cups-lpd.plist || exit 0
+fi
+killall cupsd || exit 0
+EOF
+else
+ cat >$pkgdir/Resources/preflight <<EOF
+#!/bin/sh
+# Stop any running cupsd processes...
+killall cupsd || exit 0
+EOF
+fi
+
+chmod 755 $pkgdir/Resources/preflight
+
+if test -x /bin/launchctl; then
+ cat >$pkgdir/Resources/postflight <<EOF
+#!/bin/sh
+
+# Remove old xinetd config file, we use launchd now...
+rm -f /etc/xinetd.d/cups-lpd
+
+# Tell launchd to reload cupsd...
+if test "x`whoami`" = xroot; then
+ sudo launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist
+ sudo launchctl load /System/Library/LaunchDaemons/org.cups.cupsd-lpd.plist || exit 0
+fi
+EOF
+else
+ cat >$pkgdir/Resources/postflight <<EOF
+#!/bin/sh
+
+# Start cupsd...
+/usr/sbin/cupsd
+EOF
+fi
+
+chmod 755 $pkgdir/Resources/postflight
+
+case `uname -r` in
+ 8.* | 9.*)
+ cp packaging/InstallationCheck $pkgdir/Resources
+ chmod 755 $pkgdir/Resources/InstallationCheck
+ ;;
+esac
+
+# Tag the current revision in the plist and web interface files...
+for file in packaging/cups-desc.plist packaging/cups-info.plist \
+ doc/index.html templates/header.tmpl; do
+ echo Updating $file...
+ sed -e '1,$s/@CUPS_VERSION@/'$version'/g' \
+ -e '1,$s/@CUPS_REVISION@//g' \
+ -e '1,$s/@CUPS_RELEASE@/1.5.'$rev'/g' \
+ <$file.in >$file
+done
+
+# Install CUPS into the Package directory...
+#make INSTALL=$topdir/install-sh BUILDROOT=$pkgdir/Package install
+make BUILDROOT=$pkgdir/Package install || exit 1
+
+# Figure out where PackageMaker is installled...
+if test -d /Developer/Applications/Utilities/PackageMaker.app; then
+ PackageMaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
+else
+ PackageMaker=/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
+fi
+
+# Create the package...
+echo Creating MacOS X package...
+rm -rf cups.pkg
+echo $PackageMaker -build -v -p cups.pkg \
+ -f $pkgdir/Package \
+ -r $pkgdir/Resources \
+ -d packaging/cups-desc.plist \
+ -i packaging/cups-info.plist
+$PackageMaker -build -v -p cups.pkg \
+ -f $pkgdir/Package \
+ -r $pkgdir/Resources \
+ -d packaging/cups-desc.plist \
+ -i packaging/cups-info.plist
+
+# Create a disk image...
+echo Creating MacOS X disk image...
+hdiutil create -ov -srcfolder cups.pkg cups-$version.dmg
+
+# Cleanup temp files...
+echo Removing temporary files...
+#rm -rf $pkgdir
--- /dev/null
+#!/bin/sh
+#
+# "$Id: testrpm 11139 2013-07-15 13:22:34Z msweet $"
+#
+# Test script for making RPMs...
+#
+
+# Make sure we are running in the right directory...
+if test ! -f tools/testrpm; then
+ echo "Run this script from the top-level CUPS source directory, e.g.:"
+ echo ""
+ echo " tools/testrpm [rpmbuild options]"
+ echo ""
+ exit 1
+fi
+
+# Strip command-line arguments so we don't create a release tag...
+args="$*"
+shift $#
+
+# Get a snapshot of the current source...
+. tools/makesrcdist
+
+# Build the RPM...
+echo Building rpm...
+rm -f /usr/src/redhat/RPMS/i386/cups*.rpm
+rm -f /usr/src/redhat/SRPMS/cups*.rpm
+rpmbuild -ta $args cups-$fileversion-source.tar.bz2
+
+#
+# End of "$Id: testrpm 11139 2013-07-15 13:22:34Z msweet $".
+#