use Test::More;
use Email::MIME;
use PublicInbox::TestCommon;
+require_mods(qw(Plack::Handler::CGI Plack::Util));
my ($tmpdir, $for_destroy) = tmpdir();
my $home = "$tmpdir/pi-home";
my $pi_home = "$home/.public-inbox";
my $pi_config = "$pi_home/config";
my $maindir = "$tmpdir/main.git";
my $addr = 'test-public@example.com';
-my $cfgpfx = "publicinbox.test";
{
is(1, mkdir($home, 0755), "setup ~/ for testing");
open my $fh, '>', "$maindir/description" or die "open: $!\n";
print $fh "test for public-inbox\n";
close $fh or die "close: $!\n";
- my %cfg = (
- "$cfgpfx.address" => $addr,
- "$cfgpfx.inboxdir" => $maindir,
- "$cfgpfx.indexlevel" => 'basic',
- );
- while (my ($k,$v) = each %cfg) {
- is(0, system(qw(git config --file), $pi_config, $k, $v),
- "setup $k");
- }
+ open $fh, '>>', $pi_config or die;
+ print $fh <<EOF or die;
+[publicinbox "test"]
+ address = $addr
+ inboxdir = $maindir
+ indexlevel = basic
+EOF
+ close $fh or die "close: $!\n";
}
-use_ok 'PublicInbox::Git';
-use_ok 'PublicInbox::Import';
use_ok 'PublicInbox::Inbox';
use_ok 'PublicInbox::InboxWritable';
use_ok 'PublicInbox::Config';