Config expressions passing tests.
This commit is contained in:
@@ -630,8 +630,8 @@ async fn address_mappings() {
|
||||
expected-catch = false
|
||||
|
||||
[custom]
|
||||
catch-all = { map = "(.+)@(.+)$", to = "info@${2}" }
|
||||
subaddressing = { map = "^([^.]+)\.([^.]+)@(.+)$", to = "${2}@${3}" }
|
||||
catch-all = [{if = "matches('(.+)@(.+)$', address)", then = "'info@' + $2"}, {else = false}]
|
||||
subaddressing = [{ if = "matches('^([^.]+)\.([^.]+)@(.+)$', address)", then = "$2 + '@' + $3" }, {else = false}]
|
||||
expected-sub = "doe+alias@example.org"
|
||||
expected-catch = "info@example.org"
|
||||
"#;
|
||||
|
||||
@@ -223,7 +223,6 @@ async fn sql_directory() {
|
||||
handle.email_to_ids("info@example.org").await.unwrap(),
|
||||
map_account_ids(base_store, vec!["bill", "jane", "john"]).await
|
||||
);
|
||||
let todo = "test regex subaddressing";
|
||||
assert_eq!(
|
||||
handle.email_to_ids("jane+alias@example.org").await.unwrap(),
|
||||
map_account_ids(base_store, vec!["jane"]).await
|
||||
|
||||
Reference in New Issue
Block a user