package mail import "testing" func TestIdentityDisplayName(t *testing.T) { if got := identityDisplayName("Work", "a@b.com"); got != "Work" { t.Fatalf("got %q", got) } if got := identityDisplayName("", "alice@example.com"); got != "alice" { t.Fatalf("got %q", got) } } func TestDefaultSignatureName(t *testing.T) { if got := defaultSignatureName("a@b.com"); got != "Signature — a@b.com" { t.Fatalf("got %q", got) } }