]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/mda.t
run update-copyrights from gnulib for 2019
[public-inbox.git] / t / mda.t
diff --git a/t/mda.t b/t/mda.t
index f3c5164b44b3ef36e556f752fb71e780f25f61f6..5621b7d6b4e01d8449894b54ea2959cf1731db5a 100644 (file)
--- a/t/mda.t
+++ b/t/mda.t
@@ -1,11 +1,11 @@
-# Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
-# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2014-2019 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
 use Test::More;
 use Email::MIME;
 use File::Temp qw/tempdir/;
-use Cwd;
+use Cwd qw(getcwd);
 use PublicInbox::MID qw(mid2path);
 eval { require IPC::Run };
 plan skip_all => "missing IPC::Run for t/mda.t" if $@;
@@ -57,7 +57,7 @@ local $ENV{GIT_COMMITTER_NAME} = eval {
        my $msg = Email::MIME->new($str);
 
        my $from = $msg->header('From');
-       my $author = PublicInbox::Address::from_name($from);
+       my ($author) = PublicInbox::Address::names($from);
        my ($email) = PublicInbox::Address::emails($from);
        my $date = $msg->header('Date');
 
@@ -187,6 +187,7 @@ EOF
                # now train it
                local $ENV{GIT_AUTHOR_EMAIL} = 'trainer@example.com';
                local $ENV{GIT_COMMITTER_EMAIL} = 'trainer@example.com';
+               local $ENV{GIT_COMMITTER_NAME} = undef;
                IPC::Run::run([$learn, "spam"], \$msg);
                is($?, 0, "no failure from learning spam");
                IPC::Run::run([$learn, "spam"], \$msg);