diff --git a/tests/test-address.svtest b/tests/test-address.svtest index 8ced8a6400fa73c7f66f60c53e5009dcb62d991d..135d5499fbae57158de1776597574bb684fce817 100644 --- a/tests/test-address.svtest +++ b/tests/test-address.svtest @@ -310,6 +310,7 @@ To: @example.org Cc: nonsense Resent-To: Bcc: nico@frop.example.com, @example.org +Resent-Cc:<jürgen@example.com> Subject: Invalid addresses Test. @@ -321,10 +322,18 @@ test "Invalid addresses" { test_fail ":localpart matched invalid address"; } + if address :localpart "resent-cc" "jürgen" { + test_fail ":localpart matched invalid UTF-8 address"; + } + if address :domain "to" "example.org" { test_fail ":domain matched invalid address"; } + if address :domain "resent-cc" "example.com" { + test_fail ":domain matched invalid UTF-8 address"; + } + if not address :is :all "resent-to" "" { test_fail ":all failed to match empty address"; } @@ -333,6 +342,10 @@ test "Invalid addresses" { test_fail ":all failed to match invalid address"; } + if not address :is :all "resent-cc" "<jürgen@example.com>" { + test_fail ":all failed to match invalid UTF-8 address"; + } + if address :is :localpart "bcc" "" { test_fail ":localpart matched invalid address"; }