-# Copyright (C) 2017 all contributors <meta@public-inbox.org>
+# Copyright (C) 2017-2018 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
use warnings;
my $num = 0;
# nb. using internal API, fragile!
-my $xdb = $rw->_xdb_acquire;
-$xdb->begin_transaction;
+$rw->begin_txn_lazy;
foreach (reverse split(/\n\n/, $data)) {
$_ .= "\n";
ok($doc_id, 'message added: '. $mid);
}
-$xdb->commit_transaction;
-$rw = undef;
+$rw->commit_txn_lazy;
my $cfgpfx = "publicinbox.test";
my $config = PublicInbox::Config->new({
is('%C3%86var', (keys %uniq)[0], 'matches original query');
ok(index($html, 'by Ævar Arnfjörð Bjarmason') >= 0,
"displayed Ævar's name properly in HTML");
+
+ my $warn = [];
+ local $SIG{__WARN__} = sub { push @$warn, @_ };
+ $res = $cb->(GET('/test/?q=s:test&l=5e'));
+ is($res->code, 200, 'successful search result');
+ is_deeply([], $warn, 'no warnings from non-numeric comparison');
+
+ $res = $cb->(POST('/test/?q=s:bogus&x=m'));
+ is($res->code, 404, 'failed search result gives 404');
+ is_deeply([], $warn, 'no warnings');
});
done_testing();