test(email): add the RFC 5321 Mailbox cases to the remaining drafts - #1164
Open
kabirvashisht4-glitch wants to merge 1 commit into
Open
Conversation
The seven cases added in 995932c (json-schema-org#467) only landed in draft2020-12, so draft2019-09, draft7, draft6 and draft4 have been missing them since: * quoted-string local parts containing a space, a double dot, and a @ * IPv4 and IPv6 address literals after the @ * a domain containing '=', which is outside Let-dig / Ldh-str * an address literal whose final octet is 300 None of these depend on anything specific to draft2020-12 -- the email format has denoted an RFC 5321 Mailbox since draft4 -- so per CONTRIBUTING they belong in every draft that has the file. The cases are inserted at their draft2020-12 positions, which makes email.json identical across draft4 through draft2020-12, and v1, apart from the schema object. Closes json-schema-org#1162
kabirvashisht4-glitch
force-pushed
the
test/email-rfc5321-mailbox-all-drafts
branch
from
August 31, 2026 02:06
099107b to
10eca35
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1162.
The seven cases added in 995932c (#467) only landed in
draft2020-12.draft2019-09,draft7,draft6anddraft4have been missing them ever since:"joe bloggs"@example.com"joe..bloggs"@example.com"joe@bloggs"@example.comjoe.bloggs@[127.0.0.1]joe.bloggs@[IPv6:::1]joe.bloggs@invalid=domain.comjoe.bloggs@[127.0.0.300]None of them depend on anything specific to
draft2020-12.format: "email"has denoted an RFC 5321Mailboxsince draft4, and each case follows directly from that grammar:qtextSMTPis%d32-33 / %d35-91 / %d93-126, so aQuoted-stringlocal part may contain SP, consecutive., and@— covering the three quoted cases.Mailbox = Local-part "@" ( Domain / address-literal ), andaddress-literaladmits bothIPv4-address-literalandIPv6-address-literal.Domain = sub-domain *("." sub-domain)withsub-domain = Let-dig [Ldh-str], so=cannot occur in a domain.Snum = 1*3DIGIT ; representing a decimal integer value in the range 0 through 255, so300is not a valid final octet.Per CONTRIBUTING — "When adding test cases, they should be added to all past (and future) versions of the specification which they apply to" — they belong in every draft that has the file.
The cases are inserted at their
draft2020-12positions, so after this changeoptional/format/email.jsonis identical across draft4 → draft2020-12 andv1apart from theschemaobject.v1already had all seven.draft3is deliberately untouched: itsemail.jsonis a much older 11-test file that has diverged from draft4+ in far more than these seven cases, and reconciling it is a separate change.Verification
bin/jsonschema_suite checkpasses 11/11 with no skips (jsonschema==4.19.0).