From f68d78b5a85be1b59350032055f60321fbbfc116 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 5 Jul 2017 21:29:41 +0200 Subject: pkg/email: fix bug in context extraction Compare email addresses without full name. --- pkg/email/parser_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/email/parser_test.go') diff --git a/pkg/email/parser_test.go b/pkg/email/parser_test.go index d05a597be..dd758462d 100644 --- a/pkg/email/parser_test.go +++ b/pkg/email/parser_test.go @@ -78,7 +78,7 @@ func TestAddRemoveAddrContext(t *testing.T) { func TestParse(t *testing.T) { for i, test := range parseTests { t.Run(fmt.Sprint(i), func(t *testing.T) { - email, err := Parse(strings.NewReader(test.email), "") + email, err := Parse(strings.NewReader(test.email), "bot ") if err != nil { t.Fatal(err) } @@ -133,7 +133,7 @@ var parseTests = []struct { Message-ID: <123> Subject: test subject From: Bob -To: syzbot +To: syzbot Content-Type: text/plain; charset="UTF-8" text body @@ -141,10 +141,10 @@ second line #syzbot command arg1 arg2 arg3 last line`, &Email{ + BugID: "4564456", MessageID: "<123>", Subject: "test subject", From: "\"Bob\" ", - Cc: []string{"\"syzbot\" "}, Body: `text body second line #syzbot command arg1 arg2 arg3 -- cgit mrf-deployment