This commit is contained in:
2026-02-13 02:13:27 +02:00
parent 906adb539d
commit e35f9651c1
78 changed files with 200 additions and 108 deletions

View File

@@ -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"