- my $list_id = $addr;
- $list_id =~ s/@/./;
- $mime->header_set('List-Id', "<$list_id>");
- my $str = $mime->as_string;
- $str =~ s/(?<!\r)\n/\r\n/sg;
- $len = length($str);
- undef $str;
- $im->add($mime);
- $im->done;
- if ($version == 1) {
- ok(run_script(['-index', $ibx->{inboxdir}]),
- 'indexed v1');
- }
- }
+my $list_id = $addr;
+$list_id =~ s/@/./;
+$eml->header_set('List-Id', "<$list_id>");
+my $str = $eml->as_string;
+$str =~ s/(?<!\r)\n/\r\n/sg;
+my $len = length($str);
+undef $str;
+
+my $ibx = create_inbox "v$version", version => $version, indexlevel => 'basic',
+ tmpdir => $inboxdir, sub {
+ my ($im, $ibx) = @_;
+ $im->add($eml) or BAIL_OUT;
+};
+undef $eml;
+my $other = create_inbox "other$version", version => $version,
+ indexlevel => 'basic', sub {
+ my ($im) = @_;
+ $im->add(eml_load 't/utf8.eml') or BAIL_OUT;
+};