require_ok 'PublicInbox::NetWriter';
my $host = (split(/\./, hostname))[0];
my ($base) = ($0 =~ m!\b([^/]+)\.[^\.]+\z!);
-my $folder = "INBOX.$base-$host-".strftime('%Y%m%d%H%M%S', gmtime(time)).
+my $SEP = $ENV{IMAP_SEPARATOR} || '.';
+my $folder = "INBOX$SEP$base-$host-".strftime('%Y%m%d%H%M%S', gmtime(time)).
"-$$-".sprintf('%x', int(rand(0xffffffff)));
my $nwr = PublicInbox::NetWriter->new;
chop($imap_url) if substr($imap_url, -1) eq '/';
}
$set_cred_helper->("$ENV{HOME}/.gitconfig", $cred_set) if $cred_set;
+ # don't combine these two:
+ $ENV{TEST_IMAP_COMPRESS} and lei_ok qw(config imap.compress true);
+ $ENV{TEST_IMAP_DEBUG} and lei_ok qw(config imap.debug true);
+ my $proxy = $ENV{TEST_IMAP_PROXY};
+ lei_ok(qw(config imap.proxy), $proxy) if $proxy;
+
lei_ok qw(q f:qp@example.com -o), $folder_url;
$nwr->imap_each($folder_uri, $imap_slurp_all, my $res = []);
is(scalar(@$res), 1, 'got one deduped result') or diag explain($res);
$pub_cfg->each_inbox(sub { $_[0]->subscribe_unlock('ident', $obj) });
my $w = start_script(['-watch'], undef, { 2 => $err_wr });
diag 'waiting for initial fetch...';
- PublicInbox::DS->EventLoop;
+ PublicInbox::DS::event_loop();
my $ibx = $pub_cfg->lookup_name('wtest');
my $mm = $ibx->mm;
ok(defined($mm->num_for('Seen@test.example.com')),
lei_ok qw(q m:testmessage --no-external -o), $folder_url;
lei_ok qw(up), $folder_url;
+ lei_ok qw(up --all=remote);
});
undef $cleanup; # remove temporary folder