+local $ENV{GIT_COMMITTER_NAME} = eval {
+ use PublicInbox::MDA;
+ use PublicInbox::Address;
+ use Encode qw/encode/;
+ my $mbox = 't/utf8.mbox';
+ open(my $fh, '<', $mbox) or die "failed to open mbox: $mbox\n";
+ my $str = eval { local $/; <$fh> };
+ close $fh;
+ my $msg = Email::MIME->new($str);
+
+ my $from = $msg->header('From');
+ my ($author) = PublicInbox::Address::names($from);
+ my ($email) = PublicInbox::Address::emails($from);
+ my $date = $msg->header('Date');
+
+ is('Eléanor',
+ encode('us-ascii', my $tmp = $author, Encode::HTMLCREF),
+ 'HTML conversion is correct');
+ is($email, 'e@example.com', 'email parsed correctly');
+ is($date, 'Thu, 01 Jan 1970 00:00:00 +0000',
+ 'message date parsed correctly');
+ $author;
+};
+die $@ if $@;
+