wip
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Tests for command modules — registration and target parsing."""
|
||||
|
||||
from flow.commands.enter import _parse_target
|
||||
from flow.commands.enter import _parse_target, _terminfo_fix_command
|
||||
from flow.commands.container import _cname, _parse_image_ref
|
||||
|
||||
|
||||
@@ -24,6 +24,21 @@ class TestParseTarget:
|
||||
assert plat is None
|
||||
|
||||
|
||||
class TestTerminfoFixCommand:
|
||||
def test_ghostty_command(self):
|
||||
cmd = _terminfo_fix_command("xterm-ghostty", "devbox.core.lan")
|
||||
assert cmd == "infocmp -x xterm-ghostty | ssh devbox.core.lan -- tic -x -"
|
||||
|
||||
def test_wezterm_command(self):
|
||||
cmd = _terminfo_fix_command("wezterm", "user@devbox.core.lan")
|
||||
assert cmd is not None
|
||||
assert "wezterm.terminfo" in cmd
|
||||
assert "ssh user@devbox.core.lan" in cmd
|
||||
|
||||
def test_unknown_term(self):
|
||||
assert _terminfo_fix_command("xterm-256color", "devbox.core.lan") is None
|
||||
|
||||
|
||||
class TestCname:
|
||||
def test_adds_prefix(self):
|
||||
assert _cname("api") == "dev-api"
|
||||
|
||||
Reference in New Issue
Block a user