(t testing.TB)
| 287 | } |
| 288 | |
| 289 | func executable(t testing.TB) string { |
| 290 | exe, err := os.Executable() |
| 291 | if err != nil { |
| 292 | t.Skipf("skipping: test executable not found") |
| 293 | } |
| 294 | |
| 295 | // Control case: check whether exec.Command works at all. |
| 296 | // (For example, it might fail with a permission error on iOS.) |
| 297 | cmd := exec.Command(exe, "-test.list=^$") |
| 298 | cmd.Env = []string{} |
| 299 | if err := cmd.Run(); err != nil { |
| 300 | t.Skipf("skipping: exec appears not to work on %s: %v", runtime.GOOS, err) |
| 301 | } |
| 302 | |
| 303 | return exe |
| 304 | } |
| 305 | |
| 306 | func TestPanicDoChan(t *testing.T) { |
| 307 | if os.Getenv("TEST_PANIC_DOCHAN") != "" { |
no outgoing calls
no test coverage detected