-sub fail_bad_header {
- my ($good_rev, $msg, $in) = @_;
- my @f = glob("$faildir/*/*");
- unlink @f if @f;
- my ($out, $err) = ("", "");
- local $ENV{PATH} = $main_path;
- IPC::Run::run([$mda], \$in, \$out, \$err);
- my $rev = `git --git-dir=$maindir rev-list HEAD`;
- chomp $rev;
- is($rev, $good_rev, "bad revision not commited ($msg)");
- @f = glob("$faildir/*/*");
- is(scalar @f, 1, "faildir written to");
- [ $in, $out, $err ];
+EOF
+ ($out, $err) = ('', '');
+ ok(run_script(['-mda'], undef, $rdr),
+ 'mda OK with multiple List-Id matches');
+ $cur = $git->qx(qw(diff HEAD~1..HEAD));
+ like($cur, qr/^\+Message-ID: <2lids\@example>/sm,
+ 'multi List-ID match delivered');
+ like($err, qr/multiple List-ID/, 'warned about multiple List-ID');
+
+ # ensure -learn rm works after inbox address is updated
+ ($out, $err) = ('', '');
+ xsys(qw(git config --file), $pi_config, "$cfgpfx.address",
+ 'updated-address@example.com');
+ ok(run_script(['-learn', 'rm'], undef, $rdr), 'rm-ed via -learn');
+ $cur = $git->qx(qw(diff HEAD~1..HEAD));
+ like($cur, qr/^-Message-ID: <2lids\@example>/sm, 'changed in git');