(t *testing.T, path, filename string)
| 398 | } |
| 399 | |
| 400 | func (z *ZTest) Run(t *testing.T, path, filename string) { |
| 401 | if msg := z.ShouldSkip(path); msg != "" { |
| 402 | t.Skip("skipping test:", msg) |
| 403 | } |
| 404 | var err error |
| 405 | if z.Script != "" { |
| 406 | err = z.RunScript(t.Context(), path, filepath.Dir(filename), t.TempDir) |
| 407 | } else { |
| 408 | err = z.RunInternal(t.Context()) |
| 409 | } |
| 410 | if err != nil { |
| 411 | // Lead with newline so line-numbered errors are |
| 412 | // navigable in editors. |
| 413 | t.Fatalf("\n%s:%d: %s", filename, z.Line, err) |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | func diffErr(name, expected, actual string) error { |
| 418 | if !utf8.ValidString(expected) { |
nothing calls this directly
no test coverage detected