RunAndVerifyOutputLineCount runs the given command and asserts it returns the given number of output lines, then returns them.
(tb testing.TB, wantLines int, args ...string)
| 271 | |
| 272 | // RunAndVerifyOutputLineCount runs the given command and asserts it returns the given number of output lines, then returns them. |
| 273 | func (e *CLITest) RunAndVerifyOutputLineCount(tb testing.TB, wantLines int, args ...string) []string { |
| 274 | tb.Helper() |
| 275 | |
| 276 | lines := e.RunAndExpectSuccess(tb, args...) |
| 277 | require.Len(tb, lines, wantLines, "unexpected output lines for 'kopia %v', lines:\n %s", strings.Join(args, " "), strings.Join(lines, "\n ")) |
| 278 | |
| 279 | return lines |
| 280 | } |
| 281 | |
| 282 | func (e *CLITest) cmdArgs(args []string) []string { |
| 283 | var suffix []string |