MCPcopy
hub / github.com/yuin/gopher-lua / testScriptCompile

Function testScriptCompile

script_test.go:45–64  ·  view source on GitHub ↗
(t *testing.T, script string)

Source from the content-addressed store, hash-verified

43}
44
45func testScriptCompile(t *testing.T, script string) {
46 file, err := os.Open(script)
47 if err != nil {
48 t.Fatal(err)
49 return
50 }
51 chunk, err2 := parse.Parse(file, script)
52 if err2 != nil {
53 t.Fatal(err2)
54 return
55 }
56 parse.Dump(chunk)
57 proto, err3 := Compile(chunk, script)
58 if err3 != nil {
59 t.Fatal(err3)
60 return
61 }
62 nop := func(s string) {}
63 nop(proto.String())
64}
65
66func testScriptDir(t *testing.T, tests []string, directory string) {
67 if err := os.Chdir(directory); err != nil {

Callers 1

testScriptDirFunction · 0.85

Calls 4

ParseFunction · 0.92
DumpFunction · 0.92
CompileFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…