diff options
author | Eric Wong <e@80x24.org> | 2021-02-07 23:05:21 -1000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-08 22:07:50 +0000 |
commit | 29e530f1c0694107ad25881a2c693c30783f85f1 (patch) | |
tree | 5855eabccbdd1a8f5c2050ed52d49713f2be55df /t/search.t | |
parent | ecd4e2e20f1af200697e54c2a322a459cdf4c5fc (diff) | |
download | public-inbox-29e530f1c0694107ad25881a2c693c30783f85f1.tar.gz |
This matches the Inline::C version, and lets us test argv overflow with $search->query_argv_to_string;
Diffstat (limited to 't/search.t')
-rw-r--r-- | t/search.t | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -576,6 +576,13 @@ SKIP: { $q = $s->query_argv_to_string($g, [qw{OR (rt:1993-10-02)}]); like($q, qr/\AOR \(rt:749\d{6}\.\.749\d{6}\)\z/, 'trailing parentheses preserved'); + $ENV{TEST_EXPENSIVE} or + skip 'TEST_EXPENSIVE not set for argv overflow check', 1; + my @w; + local $SIG{__WARN__} = sub { push @w, @_ }; # for pure Perl version + my @fail = map { 'd:1993-10-02..2010-10-02' } (1..(4096 * 32)); + eval { $s->query_argv_to_string($g, \@fail) }; + ok($@, 'exception raised'); } done_testing(); |