MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestFocusSessionUUIDCaseInsensitive

Function TestFocusSessionUUIDCaseInsensitive

internal/iterm/iterm_test.go:86–99  ·  view source on GitHub ↗

TestFocusSessionUUIDCaseInsensitive verifies the UUID match is case-insensitive (matches the existing liveClaudeSessions normalization behavior).

(t *testing.T)

Source from the content-addressed store, hash-verified

84// case-insensitive (matches the existing liveClaudeSessions
85// normalization behavior).
86func TestFocusSessionUUIDCaseInsensitive(t *testing.T) {
87 const uuid = "AAAAAAAA-BBBB-4CCC-8DDD-EEEEEEEEEEEE"
88 const psOutput = ` PID TTY COMMAND
8999999 ttys001 /usr/local/bin/claude --session-id aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee
90`
91 stubPS(t, psOutput, nil)
92 stubRunnerOutput(t, func(args []string) ([]byte, error) {
93 return []byte("ok"), nil
94 })
95 focused, err := FocusSession(uuid, "claude")
96 if err != nil || !focused {
97 t.Errorf("uppercase UUID should match lowercase ps row; got (%v, %v)", focused, err)
98 }
99}
100
101// TestFocusSessionNoMatchInPS returns (false, nil) without touching osascript.
102func TestFocusSessionNoMatchInPS(t *testing.T) {

Callers

nothing calls this directly

Calls 3

stubPSFunction · 0.70
stubRunnerOutputFunction · 0.70
FocusSessionFunction · 0.70

Tested by

no test coverage detected