Subject: this is a subject
Message-ID: <a-mid@b>
Date: Fri, 02 Oct 1993 00:00:00 +0000
+Content-Type: text/plain; charset=iso-8859-1
hello world
EOF
my $new_mid;
-my $ibx = create_inbox 'v2', version => 2, indexlevel => 'medium',
+my $ibx = create_inbox 'v2-1', version => 2, indexlevel => 'medium',
tmpdir => "$tmpdir/v2", sub {
my ($im, $ibx) = @_;
$im->add($eml) or BAIL_OUT;
like($res->content, qr!\$INBOX_DIR/description missing!,
'got v2 description missing message');
$res = $cb->(GET('/v2test/a-mid@b/raw'));
+ is($res->header('Content-Type'), 'text/plain; charset=iso-8859-1',
+ 'charset from message used');
$raw = $res->content;
unlike($raw, qr/^From oldbug/sm, 'buggy "From_" line omitted');
like($raw, qr/^hello world$/m, 'got first message');
@bodies = ($res->content =~ /^(hello [^<]+)$/mg);
is_deeply(\@bodies, [ "hello world!\n", "hello world\n" ],
'new.html ordering is chronological');
+
+ $res = $cb->(GET('/v2test/new.atom'));
+ my @dates = ($res->content =~ m!title><updated>([^<]+)</updated>!g);
+ is_deeply(\@dates, [ "1993-10-02T00:01:00Z", "1993-10-02T00:00:00Z" ],
+ 'Date headers made it through');
};
test_psgi(sub { $www->call(@_) }, $client0);
my $env = { TMPDIR => $tmpdir, PI_CONFIG => $cfgpath };