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

Function TestShellQuote

internal/ghostty/ghostty_test.go:83–96  ·  view source on GitHub ↗

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

(t *testing.T)

Source from the content-addressed store, hash-verified

81// TestShellQuote is a sanity check on the local helper — same contract
82// as iterm.ShellQuote and terminal.ShellQuote.
83func TestShellQuote(t *testing.T) {
84 cases := []struct {
85 in, want string
86 }{
87 {"plain", "'plain'"},
88 {"with space", "'with space'"},
89 {"with'quote", `'with'\''quote'`},
90 }
91 for _, tc := range cases {
92 if got := ShellQuote(tc.in); got != tc.want {
93 t.Errorf("ShellQuote(%q) = %q; want %q", tc.in, got, tc.want)
94 }
95 }
96}

Callers

nothing calls this directly

Calls 1

ShellQuoteFunction · 0.70

Tested by

no test coverage detected