(t *testing.T)
| 107 | } |
| 108 | |
| 109 | func TestCmdEditUnknownRef(t *testing.T) { |
| 110 | _, _ = showListEditDB(t) |
| 111 | os.Setenv("EDITOR", "true") // no-op; should never run |
| 112 | t.Cleanup(func() { os.Unsetenv("EDITOR") }) |
| 113 | out := captureStdout(t, func() { |
| 114 | if rc := cmdEdit([]string{"ghost"}); rc != 1 { |
| 115 | t.Errorf("rc=%d, want 1", rc) |
| 116 | } |
| 117 | }) |
| 118 | if !strings.Contains(out, "no task, project, or playbook matching") { |
| 119 | t.Errorf("missing error; out=%q", out) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func TestCmdEditMissingRef(t *testing.T) { |
| 124 | _, _ = showListEditDB(t) |
nothing calls this directly
no test coverage detected