Skip to content

Commit 47645a9

Browse files
committed
Cleanup IPP tests.
1 parent 0524a86 commit 47645a9

10 files changed

Lines changed: 775 additions & 1191 deletions

File tree

examples/pwg5100.1.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
{
20-
NAME "PWG 5100.1-2022: Finishings Attributes"
20+
NAME "PWG 5100.1-2022: Attributes and Values"
2121
OPERATION Get-Printer-Attributes
2222

2323
GROUP operation-attributes-tag

examples/pwg5100.11.test

Lines changed: 74 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,94 @@
11
#
2-
#Check a printer for conformance with pwg5100.11
2+
# PWG 5100.11-2024: IPP Enterprise Printing Extensions v2.0 (EPX)
33
#
4+
# https://ftp.pwg.org/pub/pwg/candidates/cs-ippepx20-20240315-5100.11.pdf
45
#
5-
#Usage:
6+
# Copyright © 2018-2024 by OpenPrinting.
7+
#
8+
# Usage:
9+
#
10+
# ./ipptool [OPTIONS] -f FILENAME -t PRINTER-URI pwg5100.11.test
11+
#
12+
# Options:
13+
#
14+
# -d NOPRINT=1 Disable the print tests.
15+
# -d REQUIRE_EPX=1 Require support for the EPX specification.
616
#
7-
# ./ipptool -f FILENAME printer-uri pwg5100.11.3.test
817
#
918

1019
{
11-
# get printer attributes and check support for REQUIRED attributes
12-
13-
NAME "Get printer attributes using Get-Printer-Attributes"
14-
OPERATION Get-Printer-Attributes
15-
16-
GROUP operation-attributes-tag
17-
ATTR charset attributes-charset utf-8
18-
ATTR language attributes-natural-language en
19-
ATTR uri printer-uri $uri
20-
21-
STATUS successful-ok
22-
23-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0038 # Cancel-Jobs
24-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0039 # Cancel-My-Jobs
25-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x003B # Close-Job
26-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x003A # Resubmit-Job
27-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x002C # Reprocess-Job
28-
29-
EXPECT job-ids-supported OF-TYPE boolean IN-GROUP printer-attributes-tag WITH-VALUE "true" COUNT 1 # To check the job-ids operation-attribute support in Get-Jobs and Purge-Jobs
30-
31-
EXPECT proof-print-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE proof-print-copies #
32-
EXPECT proof-print-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE media #
33-
# checking proof-print and related attributes.
34-
EXPECT proof-print-default OF-TYPE collection|no-value IN-GROUP printer-attributes-tag #
35-
#
36-
EXPECT which-jobs-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE completed #
37-
EXPECT which-jobs-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE not-completed #
38-
EXPECT which-jobs-supported OF-TYPE keyword IN-GROUP printer-attributes-tag WITH-VALUE saved #
39-
40-
EXPECT ?job-hold-until-time-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_JOB_HOLD_UNTIL_TIME
41-
EXPECT ?job-delay-output-until-time-supported OF-TYPE rangeOfInteger IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_JOB_DELAY_OUTPUT_UNTIL_TIME
42-
EXPECT ?job-delay-output-until-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag DEFINE-MATCH HAVE_JOB_DELAY_OUTPUT_UNTIL
43-
44-
EXPECT job-hold-until-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_JOB_HOLD_UNTIL_TIME
45-
EXPECT job-hold-until-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE-FROM job-hold-until-supported COUNT 1 IF-DEFINED HAVE_JOB_HOLD_UNTIL_TIME
46-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x000C IF-DEFINED HAVE_JOB_HOLD_UNTIL_TIME # Hold-Job
47-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x000D IF-DEFINED HAVE_JOB_HOLD_UNTIL_TIME # Release-Job
48-
49-
EXPECT job-delay-output-until-supported OF-TYPE keyword|name IN-GROUP printer-attributes-tag IF-DEFINED HAVE_JOB_DELAY_OUTPUT_UNTIL_TIME
50-
EXPECT job-delay-output-until-default OF-TYPE keyword|name IN-GROUP printer-attributes-tag WITH-VALUE-FROM job-delay-output-until-supported COUNT 1 IF-DEFINED HAVE_JOB_DELAY_OUTPUT_UNTIL_TIME
51-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0014 IF-DEFINED HAVE_JOB_DELAY_OUTPUT_UNTIL_TIME # Set-job-attributes
52-
53-
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag WITH-VALUE 0x0014 IF-DEFINED HAVE_JOB_DELAY_OUTPUT_UNTIL # Set-job-attributes
54-
}
20+
NAME "PWG 5100.11-2024: Operations, Attributes, and Values"
21+
OPERATION Get-Printer-Attributes
22+
GROUP operation-attributes-tag
23+
ATTR charset attributes-charset utf-8
24+
ATTR language attributes-natural-language en
25+
ATTR uri printer-uri $uri
5526

56-
{
57-
NAME "print-job with proof-print"
58-
OPERATION Print-Job
27+
STATUS successful-ok
5928

60-
GROUP operation-attributes-tag
61-
ATTR charset attributes-charset utf-8
62-
ATTR language attributes-natural-language en
63-
ATTR uri printer-uri $uri
64-
ATTR name requesting-user-name $user
65-
ATTR mimeMediaType document-format $filetype
29+
# Section 5 - New Operations
30+
EXPECT operations-supported OF-TYPE enum IN-GROUP printer-attributes-tag
31+
EXPECT operations-supported WITH-VALUE 0x0038 DEFINE-MATCH PRINTER_HAS_GET_USER_PRINTER_ATTRIBUTES # Get-User-Printer-Attributes
6632

67-
GROUP job-attributes-tag
68-
ATTR integer copies 1
69-
ATTR collection proof-print {
70-
MEMBER integer proof-print-copies 1
71-
MEMBER keyword media letterhead
72-
}
33+
# Section 6.4 - Printer Description Attributes
34+
EXPECT ?job-cancel-after-supported OF-TYPE rangeOfInteger(1:MAX) IN-GROUP printer-attributes-tag COUNT 1
35+
EXPECT job-cancel-after-supported DEFINE-MATCH PRINTER_HAS_JOB_CANCEL_AFTER
7336

74-
FILE $filename
37+
EXPECT ?job-cancel-after-default OF-TYPE integer(1:MAX)|no-value IN-GROUP printer-attribute-tag COUNT 1
38+
EXPECT job-cancel-after-default IF-DEFINED PRINTER_HAS_JOB_CANCEL_AFTER
7539

76-
STATUS successful-ok
40+
EXPECT ?job-password-supported OF-TYPE integer(0:255) IN-GROUP printer-attributes-tag COUNT 1
41+
EXPECT job-password-supported DEFINE-MATCH PRINTER_HAS_JOB_PASSWORD
7742

78-
EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag WITH-VALUE >0 COUNT 1
79-
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
80-
}
43+
EXPECT ?job-password-encryption-supported OF-TYPE keyword IN-GROUP printer-attribute-tag
44+
EXPECT job-password-encryption-supported IF-DEFINED PRINTER_HAS_JOB_PASSWORD
8145

82-
# Wait for job to complete...
46+
EXPECT ?job-password-length-supported OF-TYPE rangeOfInteger(4:MAX) IN-GROUP printer-attributes-tag COUNT 1
47+
EXPECT job-password-length-supported IF-DEFINED PRINTER_HAS_JOB_PASSWORD
8348

84-
{
85-
NAME "Get-Job-Attributes Until Job Complete"
86-
OPERATION Get-Job-Attributes
87-
88-
GROUP operation-attributes-tag
89-
ATTR charset attributes-charset utf-8
90-
ATTR naturalLanguage attributes-natural-language en
91-
ATTR uri printer-uri $uri
92-
ATTR integer job-id $job-id
93-
ATTR name requesting-user-name $user
49+
EXPECT ?job-password-repertoire-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
50+
EXPECT job-password-repertoire-supported IF-DEFINED PRINTER_HAS_JOB_PASSWORD
9451

95-
STATUS successful-ok
52+
EXPECT ?job-password-repertoire-configured OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM job-password-repertoire-supported
53+
EXPECT job-password-repertoire-configured IF-DEFINED PRINTER_HAS_JOB_PASSWORD
9654

97-
EXPECT proof-print OF-TYPE collection IN-GROUP job-attributes-tag COUNT 1
98-
EXPECT proof-print/proof-print-copies OF-TYPE integer WITH-VALUE 1 COUNT 1
99-
EXPECT proof-print/media OF-TYPE keyword WITH-VALUE letterhead COUNT 1
100-
EXPECT job-state OF-TYPE unknown|enum IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >6 REPEAT-NO-MATCH REPEAT-LIMIT 30
101-
DISPLAY job-state
102-
}
55+
EXPECT ?job-release-action-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
56+
EXPECT job-release-action-supported DEFINE-MATCH PRINTER_HAS_JOB_RELEASE_ACTION
10357

104-
{
105-
NAME "Resubmit proof-print job"
106-
OPERATION Resubmit-Job
58+
EXPECT ?job-release-action-default OF-TYPE keyword IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE-FROM job-release-action-supported
59+
EXPECT job-release-action-default IF-DEFINED PRINTER_HAS_JOB_RELEASE_ACTION
10760

108-
GROUP operation-attributes-tag
109-
ATTR charset attributes-charset utf-8
110-
ATTR language attributes-natural-language en
111-
ATTR uri printer-uri $uri
112-
ATTR integer job-id $job-id
113-
ATTR name requesting-user-name $user
61+
EXPECT ?job-storage-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
62+
EXPECT job-storage-supported DEFINE-MATCH PRINTER_HAS_JOB_STORAGE
11463

115-
STATUS successful-ok
116-
}
64+
EXPECT ?job-storage-access-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
65+
EXPECT job-storage-access-supported DEFINE-MATCH PRINTER_HAS_JOB_STORAGE
66+
67+
EXPECT ?job-storage-disposition-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
68+
EXPECT job-storage-disposition-supported DEFINE-MATCH PRINTER_HAS_JOB_STORAGE
69+
70+
EXPECT ?job-storage-group-supported OF-TYPE name IN-GROUP printer-attributes-tag
71+
EXPECT job-storage-group-supported DEFINE-MATCH PRINTER_HAS_JOB_STORAGE
72+
73+
EXPECT ?printer-asset-tag OF-TYPE octetString IN-GROUP printer-attributes-tag COUNT 1
74+
75+
EXPECT ?printer-detailed-status-messages OF-TYPE text IN-GROUP printer-attributes-tag
76+
77+
EXPECT ?printer-service-contact-col OF-TYPE collection|unknown IN-GROUP printer-attributes-tag COUNT 1
78+
EXPECT printer-service-contact-col IF-DEFINED REQUIRE_EPX
79+
80+
EXPECT ?proof-copies-supported OF-TYPE rangeOfInteger(1:MAX) IN-GROUP printer-attributes-tag COUNT 1
81+
EXPECT proof-copies-supported DEFINE-MATCH PRINTER_HAS_PROOF_COPIES
82+
83+
# Section 6.5 - Printer Status Attributes
84+
EXPECT ?printer-serial-number OF-TYPE text IN-GROUP printer-attributes-tag COUNT 1
85+
EXPECT printer-serial-number IF-DEFINED REQUIRE_EPX
86+
87+
EXPECT ?printer-storage OF-TYPE octetString IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-storage-description
88+
EXPECT printer-storage IF-DEFINED REQUIRE_EPX
89+
90+
EXPECT ?printer-storage-description OF-TYPE text IN-GROUP printer-attributes-tag SAME-COUNT-AS printer-storage
91+
EXPECT printer-storage-description IF-DEFINED REQUIRE_EPX
92+
}
93+
94+
# TODO: Add print tests for various features

examples/pwg5100.2.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
# Determine whether the Printer supports the output-bin attribute...
2323
{
24-
NAME "PWG 5100.2-2001: output-bin Job Template Attribute"
24+
NAME "PWG 5100.2-2001: Attributes and Values"
2525

2626
OPERATION Get-Printer-Attributes
2727
GROUP operation-attributes-tag

0 commit comments

Comments
 (0)