mirror of
https://github.com/helix-editor/helix
synced 2026-07-25 22:40:56 +02:00
cd6a852c9e
This will be used by the cargo indent-check xtask to validate queries, similar to the existing indent tests in helix-core.
27 lines
342 B
Lua
27 lines
342 B
Lua
local M = {}
|
|
|
|
local function add(a, b)
|
|
return a + b
|
|
end
|
|
|
|
function M.process(items)
|
|
local total = 0
|
|
for i, v in ipairs(items) do
|
|
if v > 0 then
|
|
total = total + v
|
|
else
|
|
total = total - v
|
|
end
|
|
end
|
|
local config = {
|
|
name = "test",
|
|
values = {
|
|
1,
|
|
2,
|
|
},
|
|
}
|
|
return total, config
|
|
end
|
|
|
|
return M
|