]> git.ipfire.org Git - location/libloc.git/commitdiff
lua: Force garbage collection to test those methods
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 22 Feb 2024 14:50:49 +0000 (14:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 22 Feb 2024 14:50:49 +0000 (14:50 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/lua/main.lua

index baf1f766a36c638b567ff54e7d580a7a79a03d75..38823de20774d29e758dbf22b25ecc8896da0a16 100755 (executable)
@@ -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())