Skip to content

Commit 1d5c3c0

Browse files
authored
Merge pull request #405 from ChALkeR/chalker/email-format
Extend email format tests
2 parents 40601f6 + 7ad7443 commit 1d5c3c0

File tree

5 files changed

+175
-0
lines changed

5 files changed

+175
-0
lines changed

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

+35
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,41 @@
1212
"description": "an invalid e-mail address",
1313
"data": "2962",
1414
"valid": false
15+
},
16+
{
17+
"description": "tilde in local part is valid",
18+
"data": "[email protected]",
19+
"valid": true
20+
},
21+
{
22+
"description": "tilde before local part is valid",
23+
"data": "[email protected]",
24+
"valid": true
25+
},
26+
{
27+
"description": "tilde after local part is valid",
28+
"data": "[email protected]",
29+
"valid": true
30+
},
31+
{
32+
"description": "dot before local part is not valid",
33+
"data": "[email protected]",
34+
"valid": false
35+
},
36+
{
37+
"description": "dot after local part is not valid",
38+
"data": "[email protected]",
39+
"valid": false
40+
},
41+
{
42+
"description": "two separated dots inside local part are valid",
43+
"data": "[email protected]",
44+
"valid": true
45+
},
46+
{
47+
"description": "two subsequent dots inside local part are not valid",
48+
"data": "[email protected]",
49+
"valid": false
1550
}
1651
]
1752
}

tests/draft3/optional/format/email.json

+35
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,41 @@
1212
"description": "an invalid e-mail address",
1313
"data": "2962",
1414
"valid": false
15+
},
16+
{
17+
"description": "tilde in local part is valid",
18+
"data": "[email protected]",
19+
"valid": true
20+
},
21+
{
22+
"description": "tilde before local part is valid",
23+
"data": "[email protected]",
24+
"valid": true
25+
},
26+
{
27+
"description": "tilde after local part is valid",
28+
"data": "[email protected]",
29+
"valid": true
30+
},
31+
{
32+
"description": "dot before local part is not valid",
33+
"data": "[email protected]",
34+
"valid": false
35+
},
36+
{
37+
"description": "dot after local part is not valid",
38+
"data": "[email protected]",
39+
"valid": false
40+
},
41+
{
42+
"description": "two separated dots inside local part are valid",
43+
"data": "[email protected]",
44+
"valid": true
45+
},
46+
{
47+
"description": "two subsequent dots inside local part are not valid",
48+
"data": "[email protected]",
49+
"valid": false
1550
}
1651
]
1752
}

tests/draft4/optional/format/email.json

+35
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,41 @@
1212
"description": "an invalid e-mail address",
1313
"data": "2962",
1414
"valid": false
15+
},
16+
{
17+
"description": "tilde in local part is valid",
18+
"data": "[email protected]",
19+
"valid": true
20+
},
21+
{
22+
"description": "tilde before local part is valid",
23+
"data": "[email protected]",
24+
"valid": true
25+
},
26+
{
27+
"description": "tilde after local part is valid",
28+
"data": "[email protected]",
29+
"valid": true
30+
},
31+
{
32+
"description": "dot before local part is not valid",
33+
"data": "[email protected]",
34+
"valid": false
35+
},
36+
{
37+
"description": "dot after local part is not valid",
38+
"data": "[email protected]",
39+
"valid": false
40+
},
41+
{
42+
"description": "two separated dots inside local part are valid",
43+
"data": "[email protected]",
44+
"valid": true
45+
},
46+
{
47+
"description": "two subsequent dots inside local part are not valid",
48+
"data": "[email protected]",
49+
"valid": false
1550
}
1651
]
1752
}

tests/draft6/optional/format/email.json

+35
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,41 @@
1212
"description": "an invalid e-mail address",
1313
"data": "2962",
1414
"valid": false
15+
},
16+
{
17+
"description": "tilde in local part is valid",
18+
"data": "[email protected]",
19+
"valid": true
20+
},
21+
{
22+
"description": "tilde before local part is valid",
23+
"data": "[email protected]",
24+
"valid": true
25+
},
26+
{
27+
"description": "tilde after local part is valid",
28+
"data": "[email protected]",
29+
"valid": true
30+
},
31+
{
32+
"description": "dot before local part is not valid",
33+
"data": "[email protected]",
34+
"valid": false
35+
},
36+
{
37+
"description": "dot after local part is not valid",
38+
"data": "[email protected]",
39+
"valid": false
40+
},
41+
{
42+
"description": "two separated dots inside local part are valid",
43+
"data": "[email protected]",
44+
"valid": true
45+
},
46+
{
47+
"description": "two subsequent dots inside local part are not valid",
48+
"data": "[email protected]",
49+
"valid": false
1550
}
1651
]
1752
}

tests/draft7/optional/format/email.json

+35
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,41 @@
1212
"description": "an invalid e-mail address",
1313
"data": "2962",
1414
"valid": false
15+
},
16+
{
17+
"description": "tilde in local part is valid",
18+
"data": "[email protected]",
19+
"valid": true
20+
},
21+
{
22+
"description": "tilde before local part is valid",
23+
"data": "[email protected]",
24+
"valid": true
25+
},
26+
{
27+
"description": "tilde after local part is valid",
28+
"data": "[email protected]",
29+
"valid": true
30+
},
31+
{
32+
"description": "dot before local part is not valid",
33+
"data": "[email protected]",
34+
"valid": false
35+
},
36+
{
37+
"description": "dot after local part is not valid",
38+
"data": "[email protected]",
39+
"valid": false
40+
},
41+
{
42+
"description": "two separated dots inside local part are valid",
43+
"data": "[email protected]",
44+
"valid": true
45+
},
46+
{
47+
"description": "two subsequent dots inside local part are not valid",
48+
"data": "[email protected]",
49+
"valid": false
1550
}
1651
]
1752
}

0 commit comments

Comments
 (0)