requireLineEquals checks that the line at index idx exactly equals expected.
(t *testing.T, lines []string, idx int, expected string)
| 172 | |
| 173 | // requireLineEquals checks that the line at index idx exactly equals expected. |
| 174 | func requireLineEquals(t *testing.T, lines []string, idx int, expected string) { |
| 175 | t.Helper() |
| 176 | require.Greater(t, len(lines), idx, |
| 177 | "output has only %d lines, expected line at index %d", len(lines), idx) |
| 178 | require.Equal(t, expected, lines[idx], |
| 179 | "line %d mismatch", idx) |
| 180 | } |
| 181 | |
| 182 | // requireLineMatches checks that the line at index idx matches the regexp pattern. |
| 183 | func requireLineMatches(t *testing.T, lines []string, idx int, pattern string) { |
no outgoing calls
no test coverage detected