From: Michael R Sweet Date: Mon, 15 Apr 2019 16:11:36 +0000 (-0400) Subject: The IPP/2.2 test file tested booleans against value "1" instead of "true", but X-Git-Tag: v2.3b8~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cebb2dcc2366501b5a25fcf084da7c7cecd16c09;p=thirdparty%2Fcups.git The IPP/2.2 test file tested booleans against value "1" instead of "true", but ipptool was updated a while back to look for "true". test/ipp-2.2.test: - Change WITH-VALUE for booleans from '1' to 'true' test/ipptool.c: - Update with_value() to support both "true" and "1" for boolean true values. --- diff --git a/test/ipp-2.2.test b/test/ipp-2.2.test index f83cc1fab3..bd4fecda26 100644 --- a/test/ipp-2.2.test +++ b/test/ipp-2.2.test @@ -36,14 +36,14 @@ INCLUDE "ipp-2.1.test" EXPECT number-up-supported OF-TYPE integer|rangeOfInteger IN-GROUP printer-attributes-tag WITH-VALUE >0 EXPECT overrides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "document-numbers" EXPECT overrides-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "pages" - EXPECT page-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 1 + EXPECT page-ranges-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true # Printer description attributes EXPECT job-creation-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag - EXPECT job-ids-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 1 + EXPECT job-ids-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true EXPECT media-col-ready EXPECT media-ready - EXPECT multiple-document-jobs-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 1 + EXPECT multiple-document-jobs-supported OF-TYPE boolean IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE true EXPECT printer-alert OF-TYPE octetString IN-GROUP printer-attributes-tag EXPECT printer-alert-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-alert EXPECT printer-device-id OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1 diff --git a/test/ipptool.c b/test/ipptool.c index 7d92e960ff..aa225085e4 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -4540,7 +4540,7 @@ with_value(_cups_testdata_t *data, /* I - Test data */ case IPP_TAG_BOOLEAN : for (i = 0; i < count; i ++) { - if ((!strcmp(value, "true")) == ippGetBoolean(attr, i)) + if ((!strcmp(value, "true") || !strcmp(value, "1")) == ippGetBoolean(attr, i)) { if (!matchbuf[0]) strlcpy(matchbuf, value, matchlen);