}
require_ok 'PublicInbox::IMAP';
-my $first_range = '1-'.PublicInbox::IMAP::UID_BLOCK();
+my $first_range = '0';
my $level = '-Lbasic';
SKIP: {
Content-Disposition: attachment; filename="embed2x\.eml"\r
\r
EOF
+
+ my @hits = $mic->search('SENTON' => '18-Apr-2020');
+ is_deeply(\@hits, [ $uidnext ], 'search with date condition works');
+ ok($mic->examine($ng), 'EXAMINE on dummy');
+ @hits = $mic->search('SENTSINCE' => '18-Apr-2020');
+ is_deeply(\@hits, [], 'search on dummy with condition works');
}); # each_inbox
# message sequence numbers :<
ok(!$mic->close, 'CLOSE not idempotent');
ok($mic->logout, 'logged out');
+{
+ my $c = tcp_connect($sock);
+ $c->autoflush(1);
+ like(<$c>, qr/\* OK/, 'got a greeting');
+ print $c "\r\n";
+ like(<$c>, qr/\A\* BAD Error in IMAP command/, 'empty line');
+ print $c "tagonly\r\n";
+ like(<$c>, qr/\Atagonly BAD Error in IMAP command/, 'tag-only line');
+}
+
$td->kill;
$td->join;
is($?, 0, 'no error in exited process');
open my $fh, '<', $err or BAIL_OUT("open $err failed: $!");
my $eout = do { local $/; <$fh> };
unlike($eout, qr/wide/i, 'no Wide character warnings');
+unlike($eout, qr/uninitialized/i, 'no uninitialized warnings');
done_testing;