Skip to content
Snippets Groups Projects
Commit 26303604 authored by Sergey Ostanevich's avatar Sergey Ostanevich Committed by Kirill Yukhin
Browse files

test: new test for LuaJIT fold machinery

parent 2d5e56ff
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env tarantool
tap = require('tap')
test = tap.test("505")
test:plan(1)
-- Test file to demonstrate Lua fold machinery icorrect behavior, details:
-- https://github.com/LuaJIT/LuaJIT/issues/505
jit.opt.start("hotloop=1")
for _ = 1, 20 do
local value = "abc"
local pos_c = string.find(value, "c", 1, true)
local value2 = string.sub(value, 1, pos_c - 1)
local pos_b = string.find(value2, "b", 2, true)
assert(pos_b == 2, "FAIL: position of 'b' is " .. pos_b)
end
test:ok("PASS")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment