()
| 240 | } |
| 241 | |
| 242 | func (t *testTerminal) Stdio() terminal.Stdio { |
| 243 | t.stdout = &teeWriter{File: t.tty} |
| 244 | t.stderr = t.stdout |
| 245 | return terminal.Stdio{ |
| 246 | In: t.tty, |
| 247 | Out: t.stdout, |
| 248 | Err: t.stderr, |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | // teeWriter is a writer that duplicates all writes to a file into a buffer |
| 253 | type teeWriter struct { |
no outgoing calls
no test coverage detected