public void TestRegisterStaticLib() { LuaState state = Util.InitTestEnv(); state.BeginModule(null); state.BeginModule("Test"); state.BeginStaticLib("HelloStaticLib"); state.RegVar("value", HelloStatic_get_value, HelloStatic_set_value); state.RegFunction("Concat", HelloStatic_Concat); state.EndStaticLib(); state.EndModule(); state.EndModule(); if (state.L_DoFile("TestLuaRegisterStaticLib.lua") != ThreadStatus.LUA_OK) { Console.WriteLine(state.L_CheckString(-1)); } }