Skip to content

Commit

Permalink
tests: t/re-find.t: hardened a few JIT-related tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Jun 19, 2019
1 parent 05caee4 commit 6d99c24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions t/re-find.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __DATA__
local from, to, err
local find = ngx.re.find
local s = "a"
for i = 1, 100 do
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
from, to, err = find(s, "a")
end
if err then
Expand Down Expand Up @@ -135,7 +135,7 @@ NYI
content_by_lua_block {
local s = "hello, 1234"
local from, to, err
for i = 1, 100 do
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
from, to, err = ngx.re.find(s, "([0-9])|(hello world)", "jo", nil, 2)
end
if from or to then
Expand Down Expand Up @@ -203,7 +203,7 @@ qr/\[TRACE\s+\d+ content_by_lua\(nginx\.conf:\d+\):4 loop\]/
content_by_lua_block {
local s = "hello, 1234"
local from, to, err
for i = 1, 100 do
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
from, to, err = ngx.re.find(s, "([0-9])([0-9]+)", "jo", nil, 2)
end
if from then
Expand Down
6 changes: 3 additions & 3 deletions t/stream/re-find.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ __DATA__
local from, to, err
local find = ngx.re.find
local s = "a"
for i = 1, 100 do
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
from, to, err = find(s, "a")
end
if err then
Expand Down Expand Up @@ -119,7 +119,7 @@ NYI
content_by_lua_block {
local s = "hello, 1234"
local from, to, err
for i = 1, 100 do
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
from, to, err = ngx.re.find(s, "([0-9])|(hello world)", "jo", nil, 2)
end
if from or to then
Expand Down Expand Up @@ -179,7 +179,7 @@ qr/\[TRACE\s+\d+ content_by_lua\(nginx\.conf:\d+\):4 loop\]/
content_by_lua_block {
local s = "hello, 1234"
local from, to, err
for i = 1, 100 do
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
from, to, err = ngx.re.find(s, "([0-9])([0-9]+)", "jo", nil, 2)
end
if from then
Expand Down

0 comments on commit 6d99c24

Please sign in to comment.