Skip to content

Commit 87f09d6

Browse files
authored
Add missing email format edge cases across drafts (#849)
* Add missing email format edge cases across drafts * Add missing email format edge cases to v1
1 parent f2720d3 commit 87f09d6

6 files changed

Lines changed: 90 additions & 0 deletions

File tree

tests/draft2019-09/optional/format/email.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,21 @@
9090
"description": "full \"From\" header is invalid",
9191
"data": "\"Winston Smith\" <winston.smith@recdep.minitrue> (Records Department)",
9292
"valid": false
93+
},
94+
{
95+
"description": "local part is required",
96+
"data": "@example.com",
97+
"valid": false
98+
},
99+
{
100+
"description": "domain is required",
101+
"data": "joe.bloggs@",
102+
"valid": false
103+
},
104+
{
105+
"description": "unquoted space in local part is invalid",
106+
"data": "joe bloggs@example.com",
107+
"valid": false
93108
}
94109
]
95110
}

tests/draft2020-12/optional/format/email.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@
125125
"description": "full \"From\" header is invalid",
126126
"data": "\"Winston Smith\" <winston.smith@recdep.minitrue> (Records Department)",
127127
"valid": false
128+
},
129+
{
130+
"description": "local part is required",
131+
"data": "@example.com",
132+
"valid": false
133+
},
134+
{
135+
"description": "domain is required",
136+
"data": "joe.bloggs@",
137+
"valid": false
138+
},
139+
{
140+
"description": "unquoted space in local part is invalid",
141+
"data": "joe bloggs@example.com",
142+
"valid": false
128143
}
129144
]
130145
}

tests/draft4/optional/format/email.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@
8787
"description": "full \"From\" header is invalid",
8888
"data": "\"Winston Smith\" <winston.smith@recdep.minitrue> (Records Department)",
8989
"valid": false
90+
},
91+
{
92+
"description": "local part is required",
93+
"data": "@example.com",
94+
"valid": false
95+
},
96+
{
97+
"description": "domain is required",
98+
"data": "joe.bloggs@",
99+
"valid": false
100+
},
101+
{
102+
"description": "unquoted space in local part is invalid",
103+
"data": "joe bloggs@example.com",
104+
"valid": false
90105
}
91106
]
92107
}

tests/draft6/optional/format/email.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@
8787
"description": "full \"From\" header is invalid",
8888
"data": "\"Winston Smith\" <winston.smith@recdep.minitrue> (Records Department)",
8989
"valid": false
90+
},
91+
{
92+
"description": "local part is required",
93+
"data": "@example.com",
94+
"valid": false
95+
},
96+
{
97+
"description": "domain is required",
98+
"data": "joe.bloggs@",
99+
"valid": false
100+
},
101+
{
102+
"description": "unquoted space in local part is invalid",
103+
"data": "joe bloggs@example.com",
104+
"valid": false
90105
}
91106
]
92107
}

tests/draft7/optional/format/email.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@
8787
"description": "full \"From\" header is invalid",
8888
"data": "\"Winston Smith\" <winston.smith@recdep.minitrue> (Records Department)",
8989
"valid": false
90+
},
91+
{
92+
"description": "local part is required",
93+
"data": "@example.com",
94+
"valid": false
95+
},
96+
{
97+
"description": "domain is required",
98+
"data": "joe.bloggs@",
99+
"valid": false
100+
},
101+
{
102+
"description": "unquoted space in local part is invalid",
103+
"data": "joe bloggs@example.com",
104+
"valid": false
90105
}
91106
]
92107
}

tests/v1/format/email.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@
125125
"description": "full \"From\" header is invalid",
126126
"data": "\"Winston Smith\" <winston.smith@recdep.minitrue> (Records Department)",
127127
"valid": false
128+
},
129+
{
130+
"description": "local part is required",
131+
"data": "@example.com",
132+
"valid": false
133+
},
134+
{
135+
"description": "domain is required",
136+
"data": "joe.bloggs@",
137+
"valid": false
138+
},
139+
{
140+
"description": "unquoted space in local part is invalid",
141+
"data": "joe bloggs@example.com",
142+
"valid": false
128143
}
129144
]
130145
}

0 commit comments

Comments
 (0)