]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The IPP/2.2 test file tested booleans against value "1" instead of "true", but
authorMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 15 Apr 2019 16:11:36 +0000 (12:11 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 15 Apr 2019 16:11:36 +0000 (12:11 -0400)
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.

test/ipp-2.2.test
test/ipptool.c

index f83cc1fab3076953317ed46507416d937c6362b7..bd4fecda261e432440721828ac8f03b956d8cfc4 100644 (file)
@@ -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
index 7d92e960ff5b977223685c5ac23185027323497c..aa225085e490c9f72fb833a01dd77e23fe19430a 100644 (file)
@@ -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);