(t *testing.T)
| 98 | } |
| 99 | |
| 100 | func TestTaskConfirmPromptAllow(t *testing.T) { |
| 101 | tempXDGStateDir(t) |
| 102 | |
| 103 | task := &testTask{ |
| 104 | RunFunc: func(ctx context.Context) error { return nil }, |
| 105 | NeedsRunFunc: func(context.Context, RunInfo) bool { return true }, |
| 106 | } |
| 107 | |
| 108 | setPromptResponse(t, true) |
| 109 | err := ConfirmRun(t.Context(), t.Name(), task, "continue?") |
| 110 | if err != nil { |
| 111 | t.Error("got non-nil error:", err) |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | func TestTaskConfirmPromptDeny(t *testing.T) { |
| 116 | tempXDGStateDir(t) |
nothing calls this directly
no test coverage detected