Config expressions passing tests.

This commit is contained in:
mdecimus
2024-01-19 13:06:39 +01:00
parent 4551576e04
commit 02faa04e27
44 changed files with 344 additions and 304 deletions

View File

@@ -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"
"#;

View File

@@ -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