github.com/arnodel/golua@v0.0.0-20230215163904-e0b5347eaaa1/lib/base/lua/collectgarbage.lua (about) 1 do 2 local function test(...) 3 print(pcall(collectgarbage, ...)) 4 end 5 6 test() 7 --> =true 8 9 test("collect") 10 --> =true 11 12 test("step") 13 --> =true true 14 15 test("isrunning") 16 --> =true true 17 18 test("stop") 19 --> =true 20 21 test("isrunning") 22 --> =true false 23 24 test("restart") 25 --> =true 26 27 test("isrunning") 28 --> =true true 29 30 test("setpause") 31 --> =true 32 33 test("setstepmul") 34 --> =true 35 36 test("count") 37 --> ~true\t 38 39 test("blah") 40 --> ~false\t.*: invalid option 41 42 test(1) 43 --> ~false\t.*must be a string 44 end