diff options
| author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-10-07 13:12:08 +0300 |
|---|---|---|
| committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-10-07 13:12:18 +0300 |
| commit | 44424903aeed8310c6cc4100d79ad3b1f4e8b06f (patch) | |
| tree | f7487d0ea437b9e19d69bc26afac5eab8dd136ad /test/mandatory | |
| parent | b8bb8e88476dbd1ad60244222aba0234da63d3dd (diff) | |
| download | awall-44424903aeed8310c6cc4100d79ad3b1f4e8b06f.tar.bz2 awall-44424903aeed8310c6cc4100d79ad3b1f4e8b06f.tar.xz | |
test: filter-limit: update
Diffstat (limited to 'test/mandatory')
| -rw-r--r-- | test/mandatory/filter-limit.lua | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/test/mandatory/filter-limit.lua b/test/mandatory/filter-limit.lua index 7fe5757..4c9b7cd 100644 --- a/test/mandatory/filter-limit.lua +++ b/test/mandatory/filter-limit.lua @@ -14,22 +14,26 @@ function add(limit_type, base) for _, name in ipairs{ false, type(limit) == 'table' and count == 1 and 'foo' or nil } do - for _, log in ipairs{false, true, 'none'} do - for _, action in ipairs{false, 'pass'} do - if not (count == 30 and log and action) then - table.insert( - res, - update( - { - [limit_type..'-limit']=type(limit) == 'table' and update( - {name=name or nil}, limit - ) or limit, - log=log or nil, - action=action or nil - }, - base or {} - ) - ) + for _, no_update in ipairs{false, name or nil} do + local upd + if no_update then upd = false end + for _, log in ipairs{false, true, 'none'} do + for _, action in ipairs{false, 'pass'} do + if not (count == 30 and log and action) then + table.insert( + res, + update( + { + [limit_type..'-limit']=type(limit) == 'table' and update( + {name=name or nil, update=upd}, limit + ) or limit, + log=log or nil, + action=action or nil + }, + base or {} + ) + ) + end end end end |
