(t *testing.T)
| 46 | } |
| 47 | |
| 48 | func 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 | |
| 67 | func protectedTestParser(l *State, t *testing.T, source string) { |
| 68 | defer func() { |
nothing calls this directly
no test coverage detected