TestShellQuote is a sanity check on the local helper — same contract as iterm.ShellQuote.
(t *testing.T)
| 285 | // TestShellQuote is a sanity check on the local helper — same contract |
| 286 | // as iterm.ShellQuote. |
| 287 | func 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 | } |
nothing calls this directly
no test coverage detected