OpenPrinting / libcups

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

ipptool: Add predicate for testing the number of occurrences of an attribute #7

Open michaelrsweet opened 2 years ago

michaelrsweet commented 2 years ago

One of OpenPrinting's GSoC students asked about the ability to test the number of objects that operations like Get-Jobs return, however ipptool cannot do that yet.

Suggested syntax would be something like:

EXPECT-ALL attribute OCCURS 42
EXPECT-ALL attribute OCCURS >1
EXPECT-ALL attribute OCCURS <42

The OCCURS predicate would count the number of occurrences and then compare equality (42), greater than (>1), or less than (<42).

Would also be useful for validating support for the limit attribute...