Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions test/lib/contents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ do --- math
end

do --- pre-5.2 math +lua<5.2 -compat5.2
assert(math.mod)
assert(not math.mod)
assert(math.log10)
end

Expand All @@ -68,16 +68,12 @@ do --- string
check(string, "byte:char:dump:find:format:gmatch:gsub:len:lower:match:rep:reverse:sub:upper", "gfind")
end

do --- pre-5.2 string +lua<5.2 -compat5.2
assert(string.gfind)
end

do --- 5.2 string +lua>=5.2
assert(not string.gfind)
end

do --- pre-5.2 table +lua<5.2
check(table, "concat:foreach:foreachi:getn:insert:maxn:remove:sort", "pack:unpack:setn:new")
check(table, "concat:foreach:foreachi:getn:insert:maxn:move:remove:sort", "pack:unpack:setn:new")
end

do --- 5.2 table +lua>=5.2
Expand Down
2 changes: 1 addition & 1 deletion test/lib/ffi/bit64.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end

do --- smoke band
assert(tostring(band(1ll, 1, 1ll, -1)) == "1LL")
assert(tostring(band(1ll, 1, 1ull, -1)) == "1ULL")
assert(tostring(band(1ll, 1, 1ull, -1ll)) == "1ULL")
end

do --- smoke shl
Expand Down
13 changes: 10 additions & 3 deletions test/lib/ffi/redir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ do --- function
end

do --- variable -windows
ffi.cdef[[
int redir_bar asm("errno");
]]
if (jit.os == "BSD") then
-- Use "h_errno" instead, "errno" isn't defined in BSD libc.
ffi.cdef[[
int redir_bar asm("h_errno");
]]
else
ffi.cdef[[
int redir_bar asm("errno");
]]
end

ffi.C.redir_bar = 14
assert(ffi.C.redir_bar == 14)
Expand Down