summaryrefslogtreecommitdiffstats
path: root/test/functional/lua/test_fname.lua
blob: ffa7bb99f01f8c4f3d6ebecf1dfddaee7325f2a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
rspamd_config.TEST_FNAME = {
  callback = function(task)
    local r = task:get_parts()
    local fnames = {}
    for _,rh in ipairs(r) do
      if rh:get_filename() then
        table.insert(fnames, rh:get_filename())
      end
    end
    return true,1.0,fnames
  end
}