about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-04-01 22:58:19 +0000
committerEric Wong <e@80x24.org>2018-04-01 23:04:20 +0000
commit3f3d9cf7d88a851721f1f8468e1311a4f0c02ff6 (patch)
treecd42360b41e5e695c5f19802ec0147149b4e6e6d /t
parent051a182852a9eef8b0dc8714c81293daded1d4dc (diff)
downloadpublic-inbox-3f3d9cf7d88a851721f1f8468e1311a4f0c02ff6.tar.gz
We don't want non-fully-numeric limits being compared and
tripping warnings.  While we're at it, avoid hard-coding
'200' and reuse $LIM as the default.
Diffstat (limited to 't')
-rw-r--r--t/psgi_search.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/psgi_search.t b/t/psgi_search.t
index 1df38691..84b3daa3 100644
--- a/t/psgi_search.t
+++ b/t/psgi_search.t
@@ -64,6 +64,12 @@ test_psgi(sub { $www->call(@_) }, sub {
         is('%C3%86var', (keys %uniq)[0], 'matches original query');
         ok(index($html, 'by &#198;var Arnfj&#246;r&#240; 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');
 });
 
 done_testing();