MCPcopy
hub / github.com/openpubkey/opkssh / requireLineEquals

Function requireLineEquals

commands/inspect_test.go:174–180  ·  view source on GitHub ↗

requireLineEquals checks that the line at index idx exactly equals expected.

(t *testing.T, lines []string, idx int, expected string)

Source from the content-addressed store, hash-verified

172
173// requireLineEquals checks that the line at index idx exactly equals expected.
174func 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.
183func requireLineMatches(t *testing.T, lines []string, idx int, pattern string) {

Callers 1

TestInspectSSHCertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected