Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Sep 9, 2024
1 parent 820c230 commit 6128211
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 26 deletions.
6 changes: 3 additions & 3 deletions examples/ipp-1.1.test
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ DEFINE IPP_URI_REGEX "/^ipps?://.+$$/"

EXPECT finishings-supported DEFINE-MATCH PRINTER_HAS_FINISHINGS
EXPECT finishings-default IF-DEFINED PRINTER_HAS_FINISHINGS
EXPECT ?finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUES-FROM finishings-supported
EXPECT ?finishings-default OF-TYPE enum IN-GROUP printer-attributes-tag WITH-ALL-VALUES-FROM finishings-supported
EXPECT ?finishings-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 3

EXPECT job-hold-until-supported DEFINE-MATCH PRINTER_HAS_JOB_HOLD_UNTIL
Expand Down Expand Up @@ -330,7 +330,7 @@ DEFINE IPP_URI_REGEX "/^ipps?://.+$$/"
EXPECT document-format-default OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM document-format-supported
EXPECT document-format-supported OF-TYPE mimeMediaType IN-GROUP printer-attributes-tag

EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag WITH-VALUE-FROM natural-language-supported
EXPECT generated-natural-language-supported OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag

EXPECT ipp-versions-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE "1.1"

Expand All @@ -344,7 +344,7 @@ DEFINE IPP_URI_REGEX "/^ipps?://.+$$/"

EXPECT ?multiple-operation-time-out OF-TYPE integer(1:MAX) IN-GROUP printer-attributes-tag COUNT 1

EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1
EXPECT natural-language-configured OF-TYPE naturalLanguage IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM generated-natural-language-supported

EXPECT ?pages-per-minute OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?pages-per-minute-color OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
Expand Down
8 changes: 5 additions & 3 deletions examples/ipp-2.0.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@


# (REQUIRED) PWG 5101.1-2023: Media Standardized Names v2.1 (MSN)
DEFINE REQUIRE_MSN
DEFINE REQUIRE_MSN 1

# (REQUIRED) IETF STD 92: Internet Printing Protocol/1.1
INCLUDE "ipp-1.1.test"

# (REQUIRED) PWG 5100.1-2022: IPP Finishings v3.0 (MSN)
DEFINE REQUIRE_FIN
DEFINE REQUIRE_FIN 1
INCLUDE "pwg5100.1.test"

# (REQUIRED) PWG 5100.2-2001: IPP "output-bin" Attribute
DEFINE REQUIRE_OUTPUTBIN
DEFINE REQUIRE_OUTPUTBIN 1
INCLUDE "pwg5100.2.test"

# (RECOMMENDED) PWG 5100.7-2023: IPP Job Extensions v2.1 (JOBEXT)
Expand Down Expand Up @@ -79,12 +79,14 @@ INCLUDE "rfc3998.test"
EXPECT operations-supported WITH-VALUE 0x0008 # Cancel-Job
EXPECT operations-supported WITH-VALUE 0x0005 DEFINE-MATCH PRINTER_HAS_CREATE_JOB # Create-Job
EXPECT operations-supported WITH-VALUE 0x0006 IF-DEFINED PRINTER_HAS_CREATE_JOB # Send-Document
EXPECT operations-supported WITH-VALUE 0x003B IF-DEFINED PRINTER_HAS_CREATE_JOB # Close-Job
EXPECT operations-supported WITH-VALUE 0x0009 # Get-Job-Attributes
EXPECT operations-supported WITH-VALUE 0x000A # Get-Jobs
EXPECT operations-supported WITH-VALUE 0x000B # Get-Printer-Attributes
EXPECT operations-supported WITH-VALUE 0x0002 # Print-Job
EXPECT operations-supported WITH-VALUE 0x0006 DEFINE-MATCH PRINTER_HAS_SEND_DOCUMENT # Send-Document
EXPECT operations-supported WITH-VALUE 0x0005 IF-DEFINED PRINTER_HAS_SEND_DOCUMENT # Create-Job
EXPECT operations-supported WITH-VALUE 0x003B IF-DEFINED PRINTER_HAS_SEND_DOCUMENT # Close-Job
EXPECT operations-supported WITH-VALUE 0x0004 # Validate-Job

# Table 5 - Updated IPP Printer Description Attributes (IPP/2.0)
Expand Down
9 changes: 5 additions & 4 deletions examples/pwg5100.7.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@

# Required operations
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag
EXPECT operations-supported WITH-VALUE 0x0005 DEFINE-MATCH PRINTER_HAS_CREATE_JOB # Create-Job
EXPECT operations-supported WITH-VALUE 0x003B IF-DEFINED PRINTER_HAS_CREATE_JOB IF-DEFINED REQUIRE_JOBEXT # Close-Job
EXPECT operations-supported WITH-VALUE 0x0038 IF-DEFINED REQUIRE_JOBEXT # Cancel-Jobs
EXPECT operations-supported WITH-VALUE 0x0039 IF-DEFINED REQUIRE_JOBEXT # Cancel-My-Jobs
EXPECT operations-supported WITH-VALUE 0x003A IF-DEFINED REQUIRE_JOBEXT # Close-Job

EXPECT operations-supported WITH-VALUE 0x0038 DEFINE-MATCH PRINTER_HAS_CANCEL_JOBS
EXPECT operations-supported WITH-VALUE 0x0039 DEFINE-MATCH PRINTER_HAS_CANCEL_MY_JOBS
EXPECT operations-supported WITH-VALUE 0x003A DEFINE-MATCH PRINTER_HAS_CLOSE_JOB
EXPECT operations-supported WITH-VALUE 0x003B DEFINE-MATCH PRINTER_HAS_RESUBMIT_JOB
EXPECT operations-supported WITH-VALUE 0x003A DEFINE-MATCH PRINTER_HAS_RESUBMIT_JOB
EXPECT operations-supported WITH-VALUE 0x003B DEFINE-MATCH PRINTER_HAS_CLOSE_JOB

# Attributes and values
EXPECT job-creation-attributes-supported WITH-VALUE client-info DEFINE-MATCH PRINTER_HAS_CLIENT_INFO
Expand Down Expand Up @@ -72,7 +73,7 @@
EXPECT job-delay-output-until-time-supported OF-TYPE rangeOfInteger(0:MAX) IN-GROUP printer-attributes-tag COUNT 1 IF-DEFINED PRINTER_HAS_JOB_DELAY_OUTPUT_UNTIL

EXPECT job-history-attributes-configured IF-DEFINED REQUIRE_JOBEXT
EXPECT ?job-history-attributes-configured OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUES-FROM job-history-attributes-supported
EXPECT ?job-history-attributes-configured OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-ALL-VALUES-FROM job-history-attributes-supported
EXPECT job-history-attributes-supported IF-DEFINED REQUIRE_JOBEXT
EXPECT ?job-history-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag

Expand Down
32 changes: 16 additions & 16 deletions examples/rfc3995-3996.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

# Operations - all but Create-Job-Subscription are required...
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag
EXPECT operations-supported WITH-VALUE 0x0016 DEFINE-MATCH PRINTER_HAS_NOTIFICATIONS # Create-Printer-Subscription
EXPECT operations-supported WITH-VALUE 0x0016 DEFINE-MATCH PRINTER_HAS_NOTIFICATIONS # Create-Printer-Subscriptions

EXPECT operations-supported WITH-VALUE 0x0016 IF-DEFINED REQUIRE_RFC3995
EXPECT operations-supported WITH-VALUE 0x0016 IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT operations-supported WITH-VALUE 0x0016 DEFINE-MATCH PRINTER_HAS_CREATE_PRINTER_SUBCRIPTION
EXPECT operations-supported WITH-VALUE 0x0016 DEFINE-MATCH PRINTER_HAS_CREATE_PRINTER_SUBCRIPTIONS

EXPECT operations-supported WITH-VALUE 0x0017 DEFINE-MATCH PRINTER_HAS_CREATE_JOB_SUBCRIPTION
EXPECT operations-supported WITH-VALUE 0x0017 DEFINE-MATCH PRINTER_HAS_CREATE_JOB_SUBCRIPTIONS

EXPECT operations-supported WITH-VALUE 0x0018 IF-DEFINED REQUIRE_RFC3995
EXPECT operations-supported WITH-VALUE 0x0018 IF-DEFINED PRINTER_HAS_NOTIFICATIONS
Expand All @@ -56,28 +56,28 @@

# Subscription template attributes - defaults and supported values
EXPECT notify-attributes-supported IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?notify-attributes-supported OF-TYPE keyword IN-GROUP printer-attributes-tag

EXPECT notify-events-default IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-events-default OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?notify-events-default OF-TYPE keyword IN-GROUP printer-attributes-tag

EXPECT notify-events-supported IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-events-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT notify-events-supported WITH-VALUE job-completed IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-events-supported WITH-VALUE job-created IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-events-supported WITH-VALUE job-state-changed IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-events-supported WITH-VALUE none IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-events-supported WITH-VALUE printer-state-changed IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-events-supported WITH-VALUE printer-stopped IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT ?notify-events-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT ?notify-events-supported WITH-VALUE job-completed IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT ?notify-events-supported WITH-VALUE job-created IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT ?notify-events-supported WITH-VALUE job-state-changed IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT ?notify-events-supported WITH-VALUE none IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT ?notify-events-supported WITH-VALUE printer-state-changed IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT ?notify-events-supported WITH-VALUE printer-stopped IF-DEFINED PRINTER_HAS_NOTIFICATIONS

EXPECT notify-lease-duration-default IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-lease-duration-default OF-TYPE integer(0:67108863) IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?notify-lease-duration-default OF-TYPE integer(0:67108863) IN-GROUP printer-attributes-tag COUNT 1

EXPECT notify-lease-duration-supported IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-lease-duration-supported OF-TYPE integer(0:67108863)|rangeOfInteger(0:67108863) IN-GROUP printer-attributes-tag
EXPECT ?notify-lease-duration-supported OF-TYPE integer(0:67108863)|rangeOfInteger(0:67108863) IN-GROUP printer-attributes-tag

EXPECT notify-max-events-supported IF-DEFINED PRINTER_HAS_NOTIFICATIONS
EXPECT notify-max-events-supported OF-TYPE integer(2:MAX) IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?notify-max-events-supported OF-TYPE integer(2:MAX) IN-GROUP printer-attributes-tag COUNT 1

EXPECT ?notify-pull-method-supported OF-TYPE keyword IN-GROUP printer-attributes-tag

Expand All @@ -103,7 +103,7 @@
# Attributes and values
EXPECT ippget-event-life IF-DEFINED REQUIRE_RFC3996
EXPECT ippget-event-life IF-DEFINED PRINTER_HAS_GET_NOTIFICATIONS
EXPECT ippget-event-life OF-TYPE integer(15:MAX) IN-GROUP printer-attributes-tag COUNT 1
EXPECT ?ippget-event-life OF-TYPE integer(15:MAX) IN-GROUP printer-attributes-tag COUNT 1

EXPECT notify-pull-method-supported IF-DEFINED REQUIRE_RFC3996
EXPECT notify-pull-method-supported WITH-VALUE ippget IF-DEFINED REQUIRE_RFC3996
Expand Down

0 comments on commit 6128211

Please sign in to comment.