diff --git a/client_test.go b/client_test.go index 96ebf1f..39bd7e0 100644 --- a/client_test.go +++ b/client_test.go @@ -2803,7 +2803,7 @@ func TestClient_sendSingleMsg(t *testing.T) { t.Errorf("expected ErrGetSender, got %s", sendErr.Reason) } }) - t.Run("fail with no recepient addresses", func(t *testing.T) { + t.Run("fail with no recipient addresses", func(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() PortAdder.Add(1) diff --git a/msg_test.go b/msg_test.go index 117e8e7..3f2cf94 100644 --- a/msg_test.go +++ b/msg_test.go @@ -126,8 +126,8 @@ var ( {`" "@domain.tld`, true}, // Still valid, since quoted {`"<\"@\".!#%$@domain.tld"`, false}, // Quoting with illegal characters is not allowed {`<\"@\\".!#%$@domain.tld`, false}, // Still a bunch of random illegal characters - {`hi"@"there@domain.tld`, false}, // Quotes must be dot-seperated - {`"<\"@\\".!.#%$@domain.tld`, false}, // Quote is escaped and dot-seperated which would be RFC822 compliant, but not RFC5322 compliant + {`hi"@"there@domain.tld`, false}, // Quotes must be dot-separated + {`"<\"@\\".!.#%$@domain.tld`, false}, // Quote is escaped and dot-separated which would be RFC822 compliant, but not RFC5322 compliant {`hi\ there@domain.tld`, false}, // Spaces must be quoted {"hello@tld", true}, // TLD is enough {`你好@域名.顶级域名`, true}, // We speak RFC6532 @@ -4527,12 +4527,12 @@ func TestMsg_AttachFile(t *testing.T) { t.Errorf("expected message body to be %s, got: %s", "This is a test attachment", got) } }) - t.Run("AttachFile with non-existant file", func(t *testing.T) { + t.Run("AttachFile with non-existent file", func(t *testing.T) { message := NewMsg() if message == nil { t.Fatal("message is nil") } - message.AttachFile("testdata/non-existant-file.txt") + message.AttachFile("testdata/non-existent-file.txt") attachments := message.GetAttachments() if len(attachments) != 0 { t.Fatalf("failed to retrieve attachments list") @@ -4997,12 +4997,12 @@ func TestMsg_EmbedFile(t *testing.T) { t.Errorf("expected message body to be %s, got: %s", "This is a test embed", got) } }) - t.Run("EmbedFile with non-existant file", func(t *testing.T) { + t.Run("EmbedFile with non-existent file", func(t *testing.T) { message := NewMsg() if message == nil { t.Fatal("message is nil") } - message.EmbedFile("testdata/non-existant-file.txt") + message.EmbedFile("testdata/non-existent-file.txt") embeds := message.GetEmbeds() if len(embeds) != 0 { t.Fatalf("failed to retrieve attachments list") diff --git a/msgwriter_test.go b/msgwriter_test.go index 330507b..1b2a254 100644 --- a/msgwriter_test.go +++ b/msgwriter_test.go @@ -324,7 +324,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } switch runtime.GOOS { case "freebsd": @@ -357,7 +357,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } if !strings.Contains(buffer.String(), `Content-Type: application/octet-stream; name="attachment"`) { t.Errorf("Content-Type header not found for attachment. Mail: %s", buffer.String()) @@ -383,7 +383,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } if !strings.Contains(buffer.String(), `Content-Type: application/octet-stream; name="attachment.txt"`) { t.Errorf("Content-Type header not found for attachment. Mail: %s", buffer.String()) @@ -402,7 +402,7 @@ func TestMsgWriter_addFiles(t *testing.T) { t.Errorf("attachment not found in mail message. Mail: %s", buffer.String()) } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } switch runtime.GOOS { case "freebsd": @@ -438,7 +438,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } switch runtime.GOOS { case "freebsd": @@ -478,7 +478,7 @@ func TestMsgWriter_addFiles(t *testing.T) { } } if !strings.Contains(buffer.String(), `Content-Disposition: attachment; filename="attachment.txt"`) { - t.Errorf("Content-Dispositon header not found for attachment. Mail: %s", buffer.String()) + t.Errorf("Content-Disposition header not found for attachment. Mail: %s", buffer.String()) } switch runtime.GOOS { case "freebsd": diff --git a/smtp/smtp_test.go b/smtp/smtp_test.go index 931b74e..1b616fc 100644 --- a/smtp/smtp_test.go +++ b/smtp/smtp_test.go @@ -1492,7 +1492,7 @@ func TestNewClient(t *testing.T) { t.Run("new client via Dial fails on server not started", func(t *testing.T) { _, err := Dial(fmt.Sprintf("%s:%d", TestServerAddr, 64000)) if err == nil { - t.Error("dial on non-existant server should fail") + t.Error("dial on non-existent server should fail") } }) t.Run("new client fails on server not available", func(t *testing.T) {