MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestRunWatchSubcommandInactiveCases

Function TestRunWatchSubcommandInactiveCases

main_helpers_test.go:108–120  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

106}
107
108func 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
122func TestIsTerminalOnPipe(t *testing.T) {
123 r, w, err := os.Pipe()

Callers

nothing calls this directly

Calls 2

captureMainOutputFunction · 0.85
runWatchSubcommandFunction · 0.85

Tested by

no test coverage detected