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

Function TestShellQuote

internal/terminal/terminal_test.go:287–300  ·  view source on GitHub ↗

TestShellQuote is a sanity check on the local helper — same contract as iterm.ShellQuote.

(t *testing.T)

Source from the content-addressed store, hash-verified

285// TestShellQuote is a sanity check on the local helper — same contract
286// as iterm.ShellQuote.
287func TestShellQuote(t *testing.T) {
288 cases := []struct {
289 in, want string
290 }{
291 {"plain", "'plain'"},
292 {"with space", "'with space'"},
293 {"with'quote", `'with'\''quote'`},
294 }
295 for _, tc := range cases {
296 if got := ShellQuote(tc.in); got != tc.want {
297 t.Errorf("ShellQuote(%q) = %q; want %q", tc.in, got, tc.want)
298 }
299 }
300}

Callers

nothing calls this directly

Calls 1

ShellQuoteFunction · 0.70

Tested by

no test coverage detected