(t *testing.T, script string)
| 43 | } |
| 44 | |
| 45 | func 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 | |
| 66 | func testScriptDir(t *testing.T, tests []string, directory string) { |
| 67 | if err := os.Chdir(directory); err != nil { |
no test coverage detected
searching dependent graphs…