}
}
-// Output returns what the client showed.
-func (c *TerminalTestClient) Output() string {
- return c.out.String()
-}
-
// WaitFor waits until the client showed text.
func (c *TerminalTestClient) WaitFor(t *testing.T, text string) {
t.Helper()
}, 10*time.Second, time.Millisecond, "output so far: %q", c.Output())
}
+// Output returns what the client showed.
+func (c *TerminalTestClient) Output() string {
+ return c.out.String()
+}
+
// Close ends the input and waits for the client.
func (c *TerminalTestClient) Close() error {
err := c.input.Close()
}()
t.Cleanup(func() {
- _ = writer.Close()
+ require.NoError(t, writer.Close())
})
return client