Skip to content

Commit

Permalink
Add new tests for email address and domain regexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraSuegami committed Aug 27, 2024
1 parent ebbb8a2 commit 1205e65
Show file tree
Hide file tree
Showing 23 changed files with 729 additions and 418 deletions.
2 changes: 1 addition & 1 deletion packages/apis/src/decomposed_defs/body_hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parts": [
{
"is_public": false,
"regex_def": "((\r\n)|^)dkim-signature:"
"regex_def": "(\r\n|^)dkim-signature:"
},
{
"is_public": false,
Expand Down
4 changes: 2 additions & 2 deletions packages/apis/src/decomposed_defs/email_addr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parts": [
{
"is_public": true,
"regex_def": "[A-Za-z0-9!#$%&'*+=?^_`{|}~.]+@[A-Za-z0-9.-]+"
"regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~.@]+@[A-Za-z0-9.\\-]+"
}
]
}
}
4 changes: 2 additions & 2 deletions packages/apis/src/decomposed_defs/email_addr_with_name.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
},
{
"is_public": true,
"regex_def": "[a-zA-Z0-9!#$%&'*+-/=?^_`{\\|}~\\.]+@[a-zA-Z0-9_\\.-]+"
"regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~.@]+@[a-zA-Z0-9_.\\-]+"
},
{
"is_public": false,
"regex_def": ">"
}
]
}
}
10 changes: 3 additions & 7 deletions packages/apis/src/decomposed_defs/email_domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
"parts": [
{
"is_public": false,
"regex_def": "[A-Za-z0-9!#$%&'*+-/=?^_`{\\|}~\\.]+"
},
{
"is_public": false,
"regex_def": "@"
"regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~.]+@"
},
{
"is_public": true,
"regex_def": "[A-Za-z0-9\\.-]+"
"regex_def": "[A-Za-z0-9.\\-@]+"
}
]
}
}
6 changes: 3 additions & 3 deletions packages/apis/src/decomposed_defs/from_addr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"parts": [
{
"is_public": false,
"regex_def": "((\r\n)|^)from:"
"regex_def": "(\r\n|^)from:"
},
{
"is_public": false,
"regex_def": "([^\r\n]+<)?"
},
{
"is_public": true,
"regex_def": "[A-Za-z0-9!#$%&'\\*\\+-/=\\?^_`{\\|}~\\.]+@[A-Za-z0-9\\.-]+"
"regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~.@]+@[A-Za-z0-9.\\-]+"
},
{
"is_public": false,
"regex_def": ">?\r\n"
}
]
}
}
30 changes: 15 additions & 15 deletions packages/apis/src/decomposed_defs/from_all.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"parts": [
{
"is_public": false,
"regex_def": "((\r\n)|^)from:"
},
{
"is_public": true,
"regex_def": "[^\r\n]+"
},
{
"is_public": false,
"regex_def": "\r\n"
}
]
}
"parts": [
{
"is_public": false,
"regex_def": "(\r\n|^)from:"
},
{
"is_public": true,
"regex_def": "[^\r\n]+"
},
{
"is_public": false,
"regex_def": "\r\n"
}
]
}
2 changes: 1 addition & 1 deletion packages/apis/src/decomposed_defs/message_id.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parts": [
{
"is_public": false,
"regex_def": "((\r\n)|^)message-id:"
"regex_def": "(\r\n|^)message-id:"
},
{
"is_public": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/apis/src/decomposed_defs/subject_all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parts": [
{
"is_public": false,
"regex_def": "((\r\n)|^)subject:"
"regex_def": "(\r\n|^)subject:"
},
{
"is_public": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/apis/src/decomposed_defs/timestamp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parts": [
{
"is_public": false,
"regex_def": "((\r\n)|^)dkim-signature:"
"regex_def": "(\r\n|^)dkim-signature:"
},
{
"is_public": false,
Expand Down
6 changes: 3 additions & 3 deletions packages/apis/src/decomposed_defs/to_addr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"parts": [
{
"is_public": false,
"regex_def": "((\r\n)|^)to:"
"regex_def": "(\r\n|^)to:"
},
{
"is_public": false,
"regex_def": "([^\r\n]+<)?"
},
{
"is_public": true,
"regex_def": "[a-zA-Z0-9!#$%&'\\*\\+-/=\\?^_`{\\|}~\\.]+@[a-zA-Z0-9_\\.-]+"
"regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~.@]+@[a-zA-Z0-9_.\\-]+"
},
{
"is_public": false,
"regex_def": ">?\r\n"
}
]
}
}
30 changes: 15 additions & 15 deletions packages/apis/src/decomposed_defs/to_all.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"parts": [
{
"is_public": false,
"regex_def": "((\r\n)|^)to:"
},
{
"is_public": true,
"regex_def": "[^\r\n]+"
},
{
"is_public": false,
"regex_def": "\r\n"
}
]
}
"parts": [
{
"is_public": false,
"regex_def": "(\r\n|^)to:"
},
{
"is_public": true,
"regex_def": "[^\r\n]+"
},
{
"is_public": false,
"regex_def": "\r\n"
}
]
}
2 changes: 1 addition & 1 deletion packages/circom/circuits/common/email_addr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parts": [
{
"is_public": true,
"regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~.]+@[A-Za-z0-9.\\-]+"
"regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~.@]+@[A-Za-z0-9.\\-]+"
}
]
}
Loading

0 comments on commit 1205e65

Please sign in to comment.