X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fcgi.t;h=96c627c384e8d3ce1acf1c3a83d3eba0140d280b;hb=352956bcf1933bdaeba631deb4ade7dc7fd754b1;hp=bceb83e57de42608c7e3ad9400afc512af03cbec;hpb=fb8e7dbd1b711d25d1033c3f5f540ce47f6c0849;p=public-inbox.git diff --git a/t/cgi.t b/t/cgi.t index bceb83e5..96c627c3 100644 --- a/t/cgi.t +++ b/t/cgi.t @@ -5,7 +5,7 @@ use strict; use warnings; use Test::More; -use Email::MIME; +use PublicInbox::Eml; use PublicInbox::TestCommon; use PublicInbox::Import; require_mods(qw(Plack::Handler::CGI Plack::Util)); @@ -39,13 +39,13 @@ use_ok 'PublicInbox::InboxWritable'; use_ok 'PublicInbox::Config'; my $cfg = PublicInbox::Config->new($pi_config); my $ibx = $cfg->lookup_name('test'); -my $im = PublicInbox::InboxWritable->new($ibx)->importer; +my $im = PublicInbox::InboxWritable->new($ibx)->importer(0); { local $ENV{HOME} = $home; # inject some messages: - my $mime = Email::MIME->new(<new(< To: You Cc: $addr @@ -62,7 +62,7 @@ EOF ok($im->add($mime), 'added big message'); # deliver a reply, too - $mime = Email::MIME->new(<new(< To: Me Cc: $addr @@ -79,7 +79,7 @@ EOF ok($im->add($mime), 'added reply'); my $slashy_mid = 'slashy/asdf@example.com'; - my $slashy = Email::MIME->new(<new(< To: Me Cc: $addr @@ -158,7 +158,7 @@ sub cgi_run { my ($in, $out, $err) = ("", "", ""); my $rdr = { 0 => \$in, 1 => \$out, 2 => \$err }; run_script(['.cgi'], \%env, $rdr); - die "unexpected error: \$?=$?" if $?; + die "unexpected error: \$?=$? ($err)" if $?; my ($head, $body) = split(/\r\n\r\n/, $out, 2); { head => $head, body => $body, err => $err } }