use PublicInbox::Feed;
use PublicInbox::Git;
use PublicInbox::Import;
+use PublicInbox::Inbox;
use File::Temp qw/tempdir/;
my $tmpdir = tempdir('pi-http-XXXXXX', TMPDIR => 1, CLEANUP => 1);
my $git_dir = "$tmpdir/gittest";
-my $git = PublicInbox::Git->new($git_dir);
+my $ibx = PublicInbox::Inbox->new({
+ address => 'test@example',
+ name => 'tester',
+ mainrepo => $git_dir,
+ url => 'http://example.com/test',
+});
+my $git = $ibx->git;
my $im = PublicInbox::Import->new($git, 'tester', 'test@example');
# setup
my $prev = "";
foreach my $i (1..6) {
- # my $pid = open(my $pipe, "|-");
- # defined $pid or die "fork/pipe failed: $!\n";
- # if ($pid == 0) {
- # exec("ssoma-mda", $git_dir);
- # }
my $mid = "<$i\@example.com>";
my $mid_line = "Message-ID: $mid";
if ($prev) {
$im->done;
}
-# check HTML index
-{
- use IO::File;
- my $cb = PublicInbox::Feed::generate_html_index({
- git_dir => $git_dir,
- max => 3
- });
- require 't/common.perl';
- like(stream_to_string($cb), qr/html/, "feed is valid HTML :)");
-}
-
done_testing();