Browse Source

[Minor] Fix tests and invocation

tags/3.5
Vsevolod Stakhov 1 year ago
parent
commit
5858739fec
No account linked to committer's email address
2 changed files with 4 additions and 3 deletions
  1. 1
    1
      lualib/lua_selectors/init.lua
  2. 3
    2
      test/lua/unit/selectors.lua

+ 1
- 1
lualib/lua_selectors/init.lua View File

@@ -580,7 +580,7 @@ exports.create_selector_closure_fn = function(log_obj, cfg, selector_str, delimi
local res = exports.process_selectors(task, selector)

if res then
fn(log_obj, res, delimiter)
return fn(log_obj, res, delimiter)
end

return nil

+ 3
- 2
test/lua/unit/selectors.lua View File

@@ -35,8 +35,9 @@ context("Selectors test", function()
end)

local function check_selector(selector_string)
local sels = lua_selectors.parse_selector(cfg, selector_string)
local elts = lua_selectors.process_selectors(task, sels)
local sels = lua_selectors.create_selector_closure_fn(nil, cfg, selector_string, nil,
function(_, res, _) return res end)
local elts = sels(task)
return elts
end


Loading…
Cancel
Save