RunAndProcessStderr runs the given command, and streams its stderr line-by-line to stderrCallback until it returns false.
(tb testing.TB, stderrCallback func(line string) bool, args ...string)
| 174 | |
| 175 | // RunAndProcessStderr runs the given command, and streams its stderr line-by-line to stderrCallback until it returns false. |
| 176 | func (e *CLITest) RunAndProcessStderr(tb testing.TB, stderrCallback func(line string) bool, args ...string) (wait func() error, kill func()) { |
| 177 | tb.Helper() |
| 178 | |
| 179 | wait, interrupt := e.RunAndProcessStderrInt(tb, stderrCallback, nil, args...) |
| 180 | kill = func() { |
| 181 | interrupt(os.Kill) |
| 182 | } |
| 183 | |
| 184 | return wait, kill |
| 185 | } |
| 186 | |
| 187 | // RunAndProcessStderrAsync runs the given command, and streams its stderr line-by-line stderrCallback until it returns false. |
| 188 | func (e *CLITest) RunAndProcessStderrAsync(tb testing.TB, stderrCallback func(line string) bool, stderrAsyncCallback func(line string), args ...string) (wait func() error, kill func()) { |