From 8d95c3f50ea2d4671189de13b92c743a2de4d613 Mon Sep 17 00:00:00 2001 From: azumakuniyuki Date: Mon, 6 Jan 2025 06:19:23 +0900 Subject: [PATCH] #43 update the test code --- sisimai/fact/lhost-code_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sisimai/fact/lhost-code_test.go b/sisimai/fact/lhost-code_test.go index 9cfe263..35f8941 100644 --- a/sisimai/fact/lhost-code_test.go +++ b/sisimai/fact/lhost-code_test.go @@ -188,9 +188,15 @@ func EngineTest(t *testing.T, enginename string, isexpected [][]IsExpected, publ // Addresser if fs.Addresser.Address == "" { t.Errorf("%s Addresser.Address is empty", ee) }; cx++ - if fs.Addresser.Alias != "" { t.Errorf("%s Addresser.Alias is (%s) not empty", ee, fs.Addresser.Alias) }; cx++ - if fs.Addresser.Verp != "" { t.Errorf("%s Addresser.Verp is (%s) not empty", ee, fs.Addresser.Verp) }; cx++ if fs.Addresser.User == "" { t.Errorf("%s Addresser.User is empty", ee) }; cx++ + if sisiaddr.IsQuotedAddress(fs.Addresser.Address) == false { + if fs.Addresser.Alias != "" && strings.Contains(fs.Addresser.Address, "+") == false { + t.Errorf("%s Addresser.Alias is (%s) not empty", ee, fs.Addresser.Alias) + }; cx++ + if fs.Addresser.Verp != "" && strings.Contains(fs.Addresser.Address, "=") == false { + t.Errorf("%s Addresser.Verp is (%s) not empty", ee, fs.Addresser.Verp) + }; cx++ + } if fs.Addresser.Host == "" { t.Errorf("%s Addresser.User is empty", ee) }; cx++ if fs.Addresser.Host != fs.SenderDomain { // SenderDomain