(ptty *ptytest.PTY, opts cliui.SelectOptions)
| 30 | } |
| 31 | |
| 32 | func newSelect(ptty *ptytest.PTY, opts cliui.SelectOptions) (string, error) { |
| 33 | value := "" |
| 34 | cmd := &serpent.Command{ |
| 35 | Handler: func(inv *serpent.Invocation) error { |
| 36 | var err error |
| 37 | value, err = cliui.Select(inv, opts) |
| 38 | return err |
| 39 | }, |
| 40 | } |
| 41 | inv := cmd.Invoke() |
| 42 | ptty.Attach(inv) |
| 43 | return value, inv.Run() |
| 44 | } |
| 45 | |
| 46 | func TestRichSelect(t *testing.T) { |
| 47 | t.Parallel() |
no test coverage detected