OpenPrinting / libcups

OpenPrinting CUPS Library Sources
https://openprinting.github.io/cups/cups3.html
Apache License 2.0
37 stars 18 forks source link

Ipp test is not skipped for resolution attribute. #63

Closed sahusara closed 1 month ago

sahusara commented 1 year ago

ipptool: Bad resolution value "" on line 14 of 'resolution.test'.

Here is the content of resolution.test file.

{
    SKIP-IF-NOT-DEFINED PRINTER_RESOLUTION
    NAME "Validate-Job: resolution"
    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 mimeMediaType document-format application/octet-stream

    GROUP job-attributes-tag
    ATTR resolution printer-resolution $PRINTER_RESOLUTION
    # ATTR keyword sides $PRINTER_RESOLUTION #This line is for testing if the test is skipped.

    STATUS successful-ok
}

run this using below command to reproduce the issue. ipptool -vt ipp:///ipp/print resilution.test

By defining PRINTER_RESOLUTION test case passes but how to skip the resolution. ipptool -vt ipp:///ipp/print -d PRINTER_RESOLUTION=600dpi resilution.test

Note: It works for the keyword attribute.

michaelrsweet commented 1 year ago

This is probably because an empty string is a valid keyword value but not a valid resolution value... Will see what we can do here...

michaelrsweet commented 1 month ago

[master 4816d4ca2] Allow empty string for resolution values (Issue #63)