Documentation
¶
Overview ¶
Package multiclienttmux boots an isolated tmux server with aggressive-resize=on and lets a test attach N pty clients at chosen sizes — the harness from TEST-PLAN.md §6.1 / TUI-TEST-PLAN.md §6.8 for the "two web clients hijacking pane size" regression (J4 / F2).
Every harness instance gets its own socket under t.TempDir(), never touching the user's real tmux server. Cleanup tears down the server, kills all spawned client processes, and removes the socket.
Usage:
h := multiclienttmux.New(t, "myscratch") h.AddClient(80, 24) h.AddClient(120, 40) w, hgt, _ := h.WindowSize() // expect 120x40 (largest)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Harness ¶
type Harness struct {
SocketPath string // -S <path> for every tmux command targeting this server
SessionName string
// contains filtered or unexported fields
}
Harness is the live test scaffold.
func New ¶
New boots a fresh tmux server on a per-test isolated socket and creates a detached session named sessionName with aggressive-resize=on. The server and all spawned clients are torn down via t.Cleanup.
Skips the test (via t.Skip) if the tmux binary is unavailable.
func (*Harness) AddClient ¶
AddClient spawns a pty-backed `tmux attach` client at the requested size. The pty stays alive (and the client attached) until cleanup.
func (*Harness) ClientCount ¶
ClientCount returns the number of currently attached clients per tmux.