mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-15 02:12:55 +01:00
Remove IPv6 and IPv4 test cases from msg_test.go
Removed test cases for IPv6 and IPv4 addresses from `msg_test.go` as they are no longer required. Also made a minor formatting adjustment to the `checkAddrHeader` function signature for better readability.
This commit is contained in:
parent
12e9a0cb5d
commit
960c015a93
1 changed files with 2 additions and 3 deletions
|
@ -113,8 +113,6 @@ var (
|
||||||
{`hi\ there@domain.tld`, false}, // Spaces must be quoted
|
{`hi\ there@domain.tld`, false}, // Spaces must be quoted
|
||||||
{"hello@tld", true}, // TLD is enough
|
{"hello@tld", true}, // TLD is enough
|
||||||
{`你好@域名.顶级域名`, true}, // We speak RFC6532
|
{`你好@域名.顶级域名`, true}, // We speak RFC6532
|
||||||
{`cow@[dead::beef]`, true}, // IPv6 is fine
|
|
||||||
{"1@[1.101.236.21]", true}, // IPv4 is fine
|
|
||||||
{"1@23456789", true}, // Hypothetically valid, if somebody registers that TLD
|
{"1@23456789", true}, // Hypothetically valid, if somebody registers that TLD
|
||||||
{"1@[23456789]", false}, // While 23456789 is decimal for 1.101.236.21 it is not RFC5322 compliant
|
{"1@[23456789]", false}, // While 23456789 is decimal for 1.101.236.21 it is not RFC5322 compliant
|
||||||
}
|
}
|
||||||
|
@ -1140,7 +1138,8 @@ func TestMsg_ToFromString(t *testing.T) {
|
||||||
|
|
||||||
// checkAddrHeader validates a single email address in the AddrHeader of a message.
|
// checkAddrHeader validates a single email address in the AddrHeader of a message.
|
||||||
func checkAddrHeader(t *testing.T, message *Msg, header AddrHeader, fn string, field, wantFields int,
|
func checkAddrHeader(t *testing.T, message *Msg, header AddrHeader, fn string, field, wantFields int,
|
||||||
wantMail, wantName string) {
|
wantMail, wantName string,
|
||||||
|
) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
addresses, ok := message.addrHeader[header]
|
addresses, ok := message.addrHeader[header]
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in a new issue