MCPcopy Index your code
hub / github.com/yuin/gopher-lua / testScriptDir

Function testScriptDir

script_test.go:66–85  ·  view source on GitHub ↗
(t *testing.T, tests []string, directory string)

Source from the content-addressed store, hash-verified

64}
65
66func testScriptDir(t *testing.T, tests []string, directory string) {
67 if err := os.Chdir(directory); err != nil {
68 t.Error(err)
69 }
70 defer os.Chdir("..")
71 for _, script := range tests {
72 fmt.Printf("testing %s/%s\n", directory, script)
73 testScriptCompile(t, script)
74 L := NewState(Options{
75 RegistrySize: 1024 * 20,
76 CallStackSize: 1024,
77 IncludeGoStackTrace: true,
78 })
79 L.SetMx(maxMemory)
80 if err := L.DoFile(script); err != nil {
81 t.Error(err)
82 }
83 L.Close()
84 }
85}
86
87var numActiveUserDatas int32 = 0
88

Callers 2

TestGluaFunction · 0.85
TestLuaFunction · 0.85

Calls 6

testScriptCompileFunction · 0.85
DoFileMethod · 0.80
NewStateFunction · 0.70
ErrorMethod · 0.65
SetMxMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…