(t *testing.T)
| 106 | } |
| 107 | |
| 108 | func TestRunWatchSubcommandInactiveCases(t *testing.T) { |
| 109 | root := t.TempDir() |
| 110 | |
| 111 | status := captureMainOutput(func() { runWatchSubcommand("status", root) }) |
| 112 | if !strings.Contains(status, "Watch daemon not running") { |
| 113 | t.Fatalf("expected inactive status output, got:\n%s", status) |
| 114 | } |
| 115 | |
| 116 | stop := captureMainOutput(func() { runWatchSubcommand("stop", root) }) |
| 117 | if !strings.Contains(stop, "Watch daemon not running") { |
| 118 | t.Fatalf("expected inactive stop output, got:\n%s", stop) |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | func TestIsTerminalOnPipe(t *testing.T) { |
| 123 | r, w, err := os.Pipe() |
nothing calls this directly
no test coverage detected