use File::Path qw(mkpath);
use PublicInbox::TestCommon;
use PublicInbox::Spawn qw(which spawn);
use File::Path qw(mkpath);
use PublicInbox::TestCommon;
use PublicInbox::Spawn qw(which spawn);
my $inboxdir = $ENV{GIANT_INBOX_DIR};
(defined($inboxdir) && -d $inboxdir) or
plan skip_all => "GIANT_INBOX_DIR not defined for $0";
plan skip_all => "bad characters in $inboxdir" if $inboxdir =~ m![^\w\.\-/]!;
my ($tmpdir, $for_destroy) = tmpdir();
my $cfg = "$tmpdir/cfg";
my $inboxdir = $ENV{GIANT_INBOX_DIR};
(defined($inboxdir) && -d $inboxdir) or
plan skip_all => "GIANT_INBOX_DIR not defined for $0";
plan skip_all => "bad characters in $inboxdir" if $inboxdir =~ m![^\w\.\-/]!;
my ($tmpdir, $for_destroy) = tmpdir();
my $cfg = "$tmpdir/cfg";
{
open my $fh, '>', $cfg or BAIL_OUT "open: $!";
print $fh <<EOF or BAIL_OUT "print: $!";
[publicinbox "test"]
{
open my $fh, '>', $cfg or BAIL_OUT "open: $!";
print $fh <<EOF or BAIL_OUT "print: $!";
[publicinbox "test"]
is($?, 0, join(' ', @$cmd, 'done'));
}
is($?, 0, join(' ', @$cmd, 'done'));
}
diag "sleeping ${sec}s, imap://$host:$port/$mailbox available";
diag "tmpdir=$tmpdir (Maildirs available)";
diag "stdout=$out";
diag "sleeping ${sec}s, imap://$host:$port/$mailbox available";
diag "tmpdir=$tmpdir (Maildirs available)";
diag "stdout=$out";