More of this test will be, we use PSGI nowadays; and
most of these tests can be ported over to use PSGI and
not fork+exec as much.
{
local $ENV{HOME} = $home;
{
local $ENV{HOME} = $home;
- # ensure successful message delivery
- {
- my $mime = Email::MIME->new(<<EOF);
+ # inject some messages:
+ my $mime = Email::MIME->new(<<EOF);
From: Me <me\@example.com>
To: You <you\@example.com>
Cc: $addr
From: Me <me\@example.com>
To: You <you\@example.com>
Cc: $addr
- $im->add($mime);
- $im->done;
- my $rev = `git --git-dir=$maindir rev-list HEAD`;
- like($rev, qr/\A[a-f0-9]{40}/, "good revision committed");
- }
- {
- my $reply = Email::MIME->new(<<EOF);
+ my $reply = Email::MIME->new(<<EOF);
From: You <you\@example.com>
To: Me <me\@example.com>
Cc: $addr
From: You <you\@example.com>
To: Me <me\@example.com>
Cc: $addr
- $im->add($reply);
- $im->done;
- my $rev = `git --git-dir=$maindir rev-list HEAD`;
- like($rev, qr/\A[a-f0-9]{40}/, "good revision committed");
- }
-
+ $im->add($reply);
+ $im->done;
}
# obvious failures, first
}
# obvious failures, first
like($res->{head}, qr/Status:\s*206/i, "info/refs partial past end OK");
is($res->{body}, substr($orig, 5), 'partial body OK past end');
}
like($res->{head}, qr/Status:\s*206/i, "info/refs partial past end OK");
is($res->{body}, substr($orig, 5), 'partial body OK past end');
}
# atom feeds
{
local $ENV{HOME} = $home;
# atom feeds
{
local $ENV{HOME} = $home;