From: Michael Tremer Date: Thu, 22 Feb 2024 14:50:49 +0000 (+0000) Subject: lua: Force garbage collection to test those methods X-Git-Tag: 0.9.18~157 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ff91ee230871e88cc7e792384d2286b386d884f;p=people%2Fms%2Flibloc.git lua: Force garbage collection to test those methods Signed-off-by: Michael Tremer --- diff --git a/tests/lua/main.lua b/tests/lua/main.lua index baf1f76..38823de 100755 --- a/tests/lua/main.lua +++ b/tests/lua/main.lua @@ -65,4 +65,9 @@ function test_network() luaunit.assertNil(n1:get_country_code()) end +-- This test is not very deterministic but should help to test the GC methods +function test_gc() + print("GC: " .. collectgarbage("collect")) +end + os.exit(luaunit.LuaUnit.run())