main pico / pkg / pssh / session_command_test.go
Antonio Mika  ·  2026-10-25
 1package pssh
 2
 3import "testing"
 4
 5func TestSessionCommand(t *testing.T) {
 6	for command, want := range map[string]string{
 7		"shell":                 "shell",
 8		"pub my-topic -b=false": "pub",
 9		"  ls  ":                "ls",
10		"":                      "",
11	} {
12		if got := sessionCommand(command); got != want {
13			t.Errorf("sessionCommand(%q) = %q, want %q", command, got, want)
14		}
15	}
16}