You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful if the IF-DEFINED and IF-NOT-DEFINED predicates could be used in EXPECT and MEMBER directives so that attributes could be conditionally included in a request. For instance:
{
SKIP-IF-NOT-DEFINED HAVE_BALING
NAME '[BALING-2] Print requesting baling using finishings'
OPERATION Print-Job
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR name requesting-user-name $user
ATTR mimeMediaType document-format $filetype
GROUP job-attributes-tag
ATTR integer copies 1
ATTR enum finishings 12 # bale
ATTR integer job-pages-per-set 3 IF-DEFINED HAS_JOB_PAGES_PER_SET
ATTR integer copies 2 IF-NOT-DEFINED HAS_JOB_PAGES_PER_SET
FILE $filename
STATUS successful-ok
EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag WITH-VALUE >0 COUNT 1
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
}
From @wifiprintguy, ippsample issue 254:
It would be very useful if the IF-DEFINED and IF-NOT-DEFINED predicates could be used in EXPECT and MEMBER directives so that attributes could be conditionally included in a request. For instance:
These two lines:
are currently illegal. To achieve this you have to write 2+ tests that are nearly identical, which is not an optimal solution.
The text was updated successfully, but these errors were encountered: