MCPcopy Index your code
hub / github.com/Shopify/go-lua / TestParserExhaustively

Function TestParserExhaustively

parser_test.go:48–65  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func TestParserExhaustively(t *testing.T) {
49 _, err := exec.LookPath("luac")
50 if err != nil {
51 t.Skipf("exhaustively testing the parser requires luac: %s", err)
52 }
53 l := NewState()
54 matches, err := filepath.Glob(filepath.Join("lua-tests", "*.lua"))
55 if err != nil {
56 t.Fatal(err)
57 }
58 blackList := map[string]bool{"math.lua": true}
59 for _, source := range matches {
60 if _, ok := blackList[filepath.Base(source)]; ok {
61 continue
62 }
63 protectedTestParser(l, t, source)
64 }
65}
66
67func protectedTestParser(l *State, t *testing.T, source string) {
68 defer func() {

Callers

nothing calls this directly

Calls 2

NewStateFunction · 0.85
protectedTestParserFunction · 0.85

Tested by

no test coverage detected