(ptty *ptytest.PTY, opts cliui.RichSelectOptions)
| 64 | } |
| 65 | |
| 66 | func newRichSelect(ptty *ptytest.PTY, opts cliui.RichSelectOptions) (string, error) { |
| 67 | value := "" |
| 68 | cmd := &serpent.Command{ |
| 69 | Handler: func(inv *serpent.Invocation) error { |
| 70 | richOption, err := cliui.RichSelect(inv, opts) |
| 71 | if err == nil { |
| 72 | value = richOption.Value |
| 73 | } |
| 74 | return err |
| 75 | }, |
| 76 | } |
| 77 | inv := cmd.Invoke() |
| 78 | ptty.Attach(inv) |
| 79 | return value, inv.Run() |
| 80 | } |
| 81 | |
| 82 | func TestRichMultiSelect(t *testing.T) { |
| 83 | t.Parallel() |
no test coverage detected