diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/test/definition/init.lua | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/server/test/definition/init.lua b/server/test/definition/init.lua index 216fc6ed..190b5736 100644 --- a/server/test/definition/init.lua +++ b/server/test/definition/init.lua @@ -18,25 +18,19 @@ local function catch_target(script) end local function founded(targets, results) - while true do - local target = table.remove(targets) - if not target then - break - end - for i, result in ipairs(results) do + if #targets ~= #results then + return false + end + for _, target in ipairs(targets) do + for _, result in ipairs(results) do if target[1] == result[1] and target[2] == result[2] then - table.remove(results, i) - goto CONTINUE + goto NEXT end end do return false end - ::CONTINUE:: - end - if #results == 0 then - return true - else - return false + ::NEXT:: end + return true end function TEST(script) |