my $ops = { '' => [ \&import_done, $lei ] };
$lei->{auth}->op_merge($ops, $self) if $lei->{auth};
$self->{-wq_nr_workers} = $j // 1; # locked
- my ($op_c, undef) = $lei->workers_start($self, 'lei_import', $j, $ops);
+ (my $op_c, $ops) = $lei->workers_start($self, 'lei_import', $j, $ops);
$lei->{imp} = $self;
net_merge_complete($self) unless $lei->{auth};
$op_c->op_wait_event($ops);
my $ops = { '' => [ \&tag_done, $lei ] };
$lei->{auth}->op_merge($ops, $self) if $lei->{auth};
$self->{vmd_mod} = $vmd_mod;
- my ($op_c, undef) = $lei->workers_start($self, 'lei_tag', 1, $ops);
+ (my $op_c, $ops) = $lei->workers_start($self, 'lei_tag', 1, $ops);
$lei->{tag} = $self;
net_merge_complete($self) unless $lei->{auth};
$op_c->op_wait_event($ops);
my $imap_fail = $ENV{TEST_LEI_IMAP_FAIL_URL} //
'imaps://AzureDiamond:Hunter2@public-inbox.org:994/INBOX';
test_lei(sub {
- ok(!lei(qw(convert -o mboxrd:/dev/stdout), $imap_fail),
- 'IMAP auth failure on convert');
- like($lei_err, qr!\bE:.*?imaps://.*?!sm, 'error shown');
- unlike($lei_err, qr!Hunter2!s, 'password not shown');
- is($lei_out, '', 'nothing output');
- ok(!lei(qw(import), $imap_fail), 'IMAP auth failure on import');
- like($lei_err, qr!\bE:.*?imaps://.*?!sm, 'error shown');
- unlike($lei_err, qr!Hunter2!s, 'password not shown');
+ for my $pfx ([qw(convert -o mboxrd:/dev/stdout)], ['import'],
+ [qw(tag +L:INBOX)]) {
+ ok(!lei(@$pfx, $imap_fail), "IMAP auth failure on @$pfx");
+ like($lei_err, qr!\bE:.*?imaps://.*?!sm, 'error shown');
+ unlike($lei_err, qr!Hunter2!s, 'password not shown');
+ is($lei_out, '', 'nothing output');
+ }
});
done_testing;