(t *testing.T)
| 354 | } |
| 355 | |
| 356 | func TestOutputOutputs(t *testing.T) { |
| 357 | interrupt := time.NewTimer(time.Duration(1) * time.Second) |
| 358 | terminate := time.NewTimer(time.Duration(1) * time.Second) |
| 359 | c := NewControl(time.Duration(1)*time.Second, interrupt, terminate, false) |
| 360 | |
| 361 | b, err := c.Output(exec.Command("echo", "hello world")) |
| 362 | txt := string(b) |
| 363 | if err != nil { |
| 364 | t.Fatalf("failed to echo: %v", err) |
| 365 | } |
| 366 | if !strings.Contains(txt, "hello world") { |
| 367 | t.Errorf("output() did not echo hello world: %v", txt) |
| 368 | } |
| 369 | } |
nothing calls this directly
no test coverage detected