X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fsearch.t;h=6dd5047454aa48336895d72d843e22da8ec3ae38;hb=0283273a14e1871955f6a9132f4f3f7884ec8a3f;hp=92f3305d556c5773fadc1e64f6e9f544904ff06f;hpb=b714ab45d30d6f0298d73ef4281c1d0263a02493;p=public-inbox.git diff --git a/t/search.t b/t/search.t index 92f3305d..6dd50474 100644 --- a/t/search.t +++ b/t/search.t @@ -8,7 +8,7 @@ require_mods(qw(DBD::SQLite Search::Xapian)); require PublicInbox::SearchIdx; require PublicInbox::Inbox; require PublicInbox::InboxWritable; -use PublicInbox::MIME; +use PublicInbox::Eml; my ($tmpdir, $for_destroy) = tmpdir(); my $git_dir = "$tmpdir/a.git"; my $ibx = PublicInbox::Inbox->new({ inboxdir => $git_dir }); @@ -60,7 +60,7 @@ sub oct_is ($$$) { } $ibx->with_umask(sub { - my $root = PublicInbox::MIME->new(<<'EOF'); + my $root = PublicInbox::Eml->new(<<'EOF'); Date: Fri, 02 Oct 1993 00:00:00 +0000 Subject: Hello world Message-ID: @@ -70,7 +70,7 @@ List-Id: I'm not mad \m/ EOF - my $last = PublicInbox::MIME->new(<<'EOF'); + my $last = PublicInbox::Eml->new(<<'EOF'); Date: Sat, 02 Oct 2010 00:00:00 +0000 Subject: Re: Hello world In-Reply-To: @@ -128,7 +128,7 @@ sub filter_mids { $ibx->with_umask(sub { $rw_commit->(); my $rmid = ''; - my $reply_to_ghost = PublicInbox::MIME->new(<<"EOF"); + my $reply_to_ghost = PublicInbox::Eml->new(<<"EOF"); Date: Sat, 02 Oct 2010 00:00:00 +0000 Subject: Re: ghosts Message-ID: @@ -142,7 +142,7 @@ EOF my $reply_id = $rw->add_message($reply_to_ghost); is($reply_id, int($reply_id), "reply_id is an integer: $reply_id"); - my $was_ghost = PublicInbox::MIME->new(<<"EOF"); + my $was_ghost = PublicInbox::Eml->new(<<"EOF"); Date: Sat, 02 Oct 2010 00:00:01 +0000 Subject: ghosts Message-ID: $rmid @@ -191,7 +191,7 @@ $ibx->with_umask(sub { $rw_commit->(); $ro->reopen; my $long_mid = 'last' . ('x' x 60). '@s'; - my $long = PublicInbox::MIME->new(<new(< @@ -211,7 +211,7 @@ EOF my @res; my $long_reply_mid = 'reply-to-long@1'; - my $long_reply = PublicInbox::MIME->new(<new(< @@ -235,7 +235,7 @@ EOF # quote prioritization $ibx->with_umask(sub { $rw_commit->(); - $rw->add_message(PublicInbox::MIME->new(<<'EOF')); + $rw->add_message(PublicInbox::Eml->new(<<'EOF')); Date: Sat, 02 Oct 2010 00:00:01 +0000 Subject: Hello Message-ID: @@ -245,7 +245,7 @@ To: list@example.com > theatre illusions fade EOF - $rw->add_message(PublicInbox::MIME->new(<<'EOF')); + $rw->add_message(PublicInbox::Eml->new(<<'EOF')); Date: Sat, 02 Oct 2010 00:00:02 +0000 Subject: Hello Message-ID: @@ -269,7 +269,7 @@ EOF # circular references $ibx->with_umask(sub { my $s = 'foo://'. ('Circle' x 15).'/foo'; - my $doc_id = $rw->add_message(PublicInbox::MIME->new(<add_message(PublicInbox::Eml->new(< @@ -288,7 +288,7 @@ EOF }); $ibx->with_umask(sub { - my $mime = mime_load 't/utf8.eml'; + my $mime = eml_load 't/utf8.eml'; my $doc_id = $rw->add_message($mime); ok($doc_id > 0, 'message indexed doc_id with UTF-8'); my $msg = $rw->query('m:testmessage@example.com', {limit => 1})->[0]; @@ -371,7 +371,7 @@ $ibx->with_umask(sub { } $ibx->with_umask(sub { - my $amsg = mime_load 't/search-amsg.eml'; + my $amsg = eml_load 't/search-amsg.eml'; ok($rw->add_message($amsg), 'added attachment'); $rw_commit->(); $ro->reopen; @@ -429,7 +429,7 @@ $ibx->with_umask(sub { my $mid = "$ua.$digits.2460-100000\@penguin.transmeta.com"; is($ro->reopen->query("m:$digits", { mset => 1})->size, 0, 'no results yet'); - my $pine = PublicInbox::MIME->new(<new(< From: torvalds\@transmeta