Merge pull request #847 from MihailRis/client-side-tests

client-side `--script`, `--test` support (part 1)
This commit is contained in:
MihailRis 2026-07-25 21:59:10 +03:00 • committed by GitHub
commit 4295af15cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 1660 additions and 590 deletions

View file

@ -23,6 +23,10 @@ function file.parent(path)
return dir
end
function file.remove_ext(path)
return string.format("%s/%s", file.parent(path), file.stem(path))
end
function file.path(path)
local pos = path:find(':')
return path:sub(pos + 1)

View file

@ -59,11 +59,7 @@ end
function table.extend(t1, t2)
for i, v in pairs(t2) do
if type(i) == "number" then
t1[#t1 + 1] = v
else
t1[i] = v
end
t1[i] = v
end
return t1
@ -201,3 +197,11 @@ function table.tostring(t)
end
return s..']'
end
function table.keys(t)
local keys = {}
for key, _ in pairs(t) do
table.insert(keys, key)
end
return keys
end