+#!/bin/sh
+#
+# "$Id$"
+#
+# 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:
+#
+# ./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 -d "ADMINURL=$IPPFIND_TXT_ADMINURL" -d "UUID=$IPPFIND_TXT_UUID" $IPPFIND_SERVICE_URI bonjour-tests.test
+ $IPPTOOL -t -d "ADMINURL=$IPPFIND_TXT_ADMINURL" -d "UUID=$IPPFIND_TXT_UUID" $IPPFIND_SERVICE_URI bonjour-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>FileId</key><string>org.pwg.ipp-everywhere.bonjour-20140825</string>
+<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"
+}
+# end_test PASS/FAIL/SKIP
+end_test() {
+ echo $1
+ if test $1 = FAIL; then
+ echo "<key>Successful</key><false />" >>"$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 -d 'ADMINURL={txt_adminurl}' -d 'UUID={txt_uuid}' '{}' bonjour-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
+ $IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -E -q -d NO_VALUE_TESTS '{}' bonjour-tests.test \;
+ 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.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 -d 'ADMINURL={txt_adminurl}' -d 'UUID={txt_uuid}' '{}' bonjour-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$".
+#
--- /dev/null
+#
+# "$Id$"
+#
+# 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 -d ADMINURL=url -d UUID=uuid bonjour-tests.test
+#
+
+FILE-ID "org.pwg.ipp-everywhere.bonjour-20140825"
+
+{
+ SKIP-IF-DEFINED NO_VALUE_TESTS
+
+ # 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 "$ADMINURL"
+ EXPECT printer-uuid OF-TYPE uri IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE "urn:uuid:$UUID"
+}
+
+{
+ SKIP-IF-NOT-DEFINED NO_VALUE_TESTS
+
+ # The name of the test...
+ NAME "Validate Get-Printer-Attributes after HTTP Upgrade"
+
+ # 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$".
+#
# ./document-format-tests.sh "Printer Name"
#
-ippfind "$1._ipp._tcp.local." -x ipptool -P "$1 Document Format Results.plist" -I '{}' document-format-tests.test \;
+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
+
+$IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -P "$1 Document Format Results.plist" -I '{}' document-format-tests.test \;
#
# End of "$Id$".
# data is available in the "everywhere" subdirectory of the CUPS source code.
#
+FILE-ID "org.pwg.ipp-everywhere.document-format-20140825"
+
{
- NAME "1. PWG Raster Format Tests (mandatory)"
+ NAME "D-1. PWG Raster Format Tests (mandatory)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
#### 1.1 NO COMPRESSION ####
{
SKIP-IF-NOT-DEFINED HAVE_BLACK
- NAME "1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_SGRAY
- NAME "1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_SRGB
- NAME "1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_CMYK
- NAME "1.1 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8"
+ 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
{
SKIP-IF-NOT-DEFINED HAVE_BLACK
SKIP-IF-NOT-DEFINED HAVE_DEFLATE
- NAME "1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1, 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
{
SKIP-IF-NOT-DEFINED HAVE_SGRAY
SKIP-IF-NOT-DEFINED HAVE_DEFLATE
- NAME "1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8, 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
{
SKIP-IF-NOT-DEFINED HAVE_SRGB
SKIP-IF-NOT-DEFINED HAVE_DEFLATE
- NAME "1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8, 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
{
SKIP-IF-NOT-DEFINED HAVE_CMYK
SKIP-IF-NOT-DEFINED HAVE_DEFLATE
- NAME "1.2 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8, 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
{
SKIP-IF-NOT-DEFINED HAVE_BLACK
SKIP-IF-NOT-DEFINED HAVE_GZIP
- NAME "1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, black-1, 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
{
SKIP-IF-NOT-DEFINED HAVE_SGRAY
SKIP-IF-NOT-DEFINED HAVE_GZIP
- NAME "1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, sgray-8, 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
{
SKIP-IF-NOT-DEFINED HAVE_SRGB
SKIP-IF-NOT-DEFINED HAVE_GZIP
- NAME "1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, srgb-8, 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
{
SKIP-IF-NOT-DEFINED HAVE_CMYK
SKIP-IF-NOT-DEFINED HAVE_GZIP
- NAME "1.3 Print color.jpg-4x6.pwg @ $RASTER_RESOLUTION, cmyk-8, 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
#### 1.4 A4 TESTS ####
{
SKIP-IF-NOT-DEFINED HAVE_BLACK
- NAME "1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, black-1"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_SGRAY
- NAME "1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, sgray-8"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_SRGB
- NAME "1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, srgb-8"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_CMYK
- NAME "1.4 Print document-a4.pwg @ $RASTER_RESOLUTION, cmyk-8"
+ 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
#### 1.5 US Letter TESTS ####
{
SKIP-IF-NOT-DEFINED HAVE_BLACK
- NAME "1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, black-1"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_SGRAY
- NAME "1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, sgray-8"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_SRGB
- NAME "1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, srgb-8"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_CMYK
- NAME "1.5 Print document-letter.pwg @ $RASTER_RESOLUTION, cmyk-8"
+ 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
#### JPEG Tests
{
- NAME "2. JPEG Tests (mandatory)"
+ NAME "D-2. JPEG Tests (mandatory)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag WITH-VALUE "image/jpeg"
}
{
- NAME "2.1 Print color.jpg with defaults"
+ NAME "D-2.1 Print color.jpg with defaults"
OPERATION Print-Job
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
}
{
- NAME "2.2 Print color.jpg with copies=2"
+ NAME "D-2.2 Print color.jpg with copies=2"
OPERATION Print-Job
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
}
{
- NAME "2.3 Print color.jpg with print-color-mode=monochrome"
+ 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
STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
}
{
- NAME "2.4 Print color.jpg with media=na_letter_8.5x11in and ipp-attribute-fidelity=true"
+ 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
STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
}
{
- NAME "2.5 Print color.jpg with media=iso_a4_210x297mm and ipp-attribute-fidelity=true"
+ 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
#### PDF Tests
{
- NAME "3. PDF Tests (if PDF is supported)"
+ NAME "D-3. PDF Tests (if PDF is supported)"
OPERATION Get-Printer-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
}
{
SKIP-IF-NOT-DEFINED HAVE_PDF
- NAME "3.1 Print document-letter.pdf with defaults"
+ NAME "D-3.1 Print document-letter.pdf with defaults"
OPERATION Print-Job
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
}
{
SKIP-IF-NOT-DEFINED HAVE_PDF
- NAME "3.2 Print document-letter.pdf with copies=2"
+ NAME "D-3.2 Print document-letter.pdf with copies=2"
OPERATION Print-Job
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
}
{
SKIP-IF-NOT-DEFINED HAVE_PDF
- NAME "3.3 Print document-letter.pdf with page-ranges=3-3 and print-color-mode=monochrome"
+ 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
{
SKIP-IF-NOT-DEFINED HAVE_PDF
SKIP-IF-NOT-DEFINED HAVE_DUPLEX
- NAME "3.4 Print document-letter.pdf with sides=two-sided-long-edge"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_PDF
- NAME "3.5 Print document-letter.pdf with media=iso_a4_210x297mm and ipp-attribute-fidelity=true"
+ 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
}
{
SKIP-IF-NOT-DEFINED HAVE_PDF
- NAME "3.6 Print document-a4.pdf with media=na_letter_8.5x11in and ipp-attribute-fidelity=true"
+ 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
# ./ipp-tests.sh "Printer Name"
#
-ippfind "$1._ipp._tcp.local." -x ipptool -P "$1 IPP Results.plist" -I '{}' ipp-tests.test \;
+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
+
+$IPPFIND "$1._ipp._tcp.local." -x $IPPTOOL -P "$1 IPP Results.plist" -I '{}' ipp-tests.test \;
#
# End of "$Id$".
# 'media-needed' keywords in the "printer-state-reasons" Printer attribute.
#
+FILE-ID "org.pwg.ipp-everywhere.ipp-20140825"
+
# All tests use IPP version 2.0, unless overridden in a test...
VERSION 2.0
{
int i, /* Looping var */
have_output = 0,/* Have output expression */
- status = IPPFIND_EXIT_TRUE;
+ status = IPPFIND_EXIT_FALSE;
/* Exit status */
const char *opt, /* Option character */
*search; /* Current browse/resolve string */
service->ref = NULL;
}
- if (!eval_expr(service, expressions))
- status = IPPFIND_EXIT_FALSE;
+ if (eval_expr(service, expressions))
+ status = IPPFIND_EXIT_TRUE;
service->is_processed = 1;
}