TestShellQuoteParity makes sure the re-exported helper matches every backend's implementation. All backends quote identically.
(t *testing.T)
| 455 | // TestShellQuoteParity makes sure the re-exported helper matches |
| 456 | // every backend's implementation. All backends quote identically. |
| 457 | func TestShellQuoteParity(t *testing.T) { |
| 458 | cases := []string{"plain", "with space", "with'quote", `back\slash`, ""} |
| 459 | for _, in := range cases { |
| 460 | exp := iterm.ShellQuote(in) |
| 461 | if got := ShellQuote(in); got != exp { |
| 462 | t.Errorf("spawner.ShellQuote(%q) = %q; want %q", in, got, exp) |
| 463 | } |
| 464 | if got := terminal.ShellQuote(in); got != exp { |
| 465 | t.Errorf("terminal.ShellQuote(%q) = %q; want %q", in, got, exp) |
| 466 | } |
| 467 | if got := zellij.ShellQuote(in); got != exp { |
| 468 | t.Errorf("zellij.ShellQuote(%q) = %q; want %q", in, got, exp) |
| 469 | } |
| 470 | if got := warp.ShellQuote(in); got != exp { |
| 471 | t.Errorf("warp.ShellQuote(%q) = %q; want %q", in, got, exp) |
| 472 | } |
| 473 | if got := ghostty.ShellQuote(in); got != exp { |
| 474 | t.Errorf("ghostty.ShellQuote(%q) = %q; want %q", in, got, exp) |
| 475 | } |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | // runnerFlags bundles per-backend "was called" flags so routing tests |
| 480 | // can assert on which backend SpawnTab dispatched to without an |
nothing calls this directly
no test coverage detected