(s string)
| 452 | } |
| 453 | |
| 454 | func (c *Cmd) AssertOutExactly(s string) { |
| 455 | c.Base.T.Helper() |
| 456 | fn := func(stdout string) error { |
| 457 | if stdout != s { |
| 458 | return fmt.Errorf("expected %q, got %q", s, stdout) |
| 459 | } |
| 460 | return nil |
| 461 | } |
| 462 | c.AssertOutWithFunc(fn) |
| 463 | } |
| 464 | |
| 465 | func (c *Cmd) AssertOutWithFunc(fn func(stdout string) error) { |
| 466 | c.Base.T.Helper() |