}
}
+{
+ my $crlf_adjust = \&PublicInbox::SearchIdx::crlf_adjust;
+ is($crlf_adjust->("hi\r\nworld\r\n"), 0, 'no adjustment needed');
+ is($crlf_adjust->("hi\nworld\n"), 2, 'LF-only counts two CR');
+ is($crlf_adjust->("hi\r\nworld\n"), 1, 'CRLF/LF-mix 1 counts 1 CR');
+ is($crlf_adjust->("hi\nworld\r\n"), 1, 'CRLF/LF-mix 2 counts 1 CR');
+}
+
$ibx->with_umask(sub {
my $root = PublicInbox::Eml->new(<<'EOF');
Date: Fri, 02 Oct 1993 00:00:00 +0000
foreach my $m ($mset->items) {
my $smsg = $ro->{over_ro}->get_art($m->get_docid);
like($smsg->{to}, qr/\blist\@example\.com\b/, 'to appears');
+ my $doc = $m->get_document;
+ my $col = PublicInbox::Search::BYTES();
+ my $bytes = PublicInbox::Smsg::get_val($doc, $col);
+ like($bytes, qr/\A[0-9]+\z/, '$bytes stored as digit');
+ ok($bytes > 0, '$bytes is > 0');
+ is($bytes, $smsg->{bytes}, 'bytes Xapian value matches Over');
+
+ $col = PublicInbox::Search::UID();
+ my $uid = PublicInbox::Smsg::get_val($doc, $col);
+ is($uid, $smsg->{num}, 'UID column matches {num}');
+ is($uid, $m->get_docid, 'UID column matches docid');
}
$mset = $ro->query('tc:list@example.com', {mset => 1});