MCPcopy
hub / github.com/cli/cli / testCloser

Function testCloser

internal/prompter/accessible_prompter_test.go:953–958  ·  view source on GitHub ↗

testCloser is a helper to fail the test if a Closer fails to close.

(t *testing.T, closer io.Closer)

Source from the content-addressed store, hash-verified

951
952// testCloser is a helper to fail the test if a Closer fails to close.
953func testCloser(t *testing.T, closer io.Closer) {
954 t.Helper()
955 if err := closer.Close(); err != nil {
956 t.Errorf("Close failed: %s", err)
957 }
958}
959
960// waitForEchoDisabled polls the TTY until echo mode is disabled or the
961// timeout is reached. This is used in password and auth token tests to

Callers 1

newTestVirtualTerminalFunction · 0.70

Calls 3

HelperMethod · 0.65
CloseMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected