Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
parent
9000640b2e
commit
9fcfba3c17
16 changed files with 415 additions and 80 deletions
|
|
@ -1,4 +1,5 @@
|
|||
from tamq.control import shell_quote
|
||||
from tamq import control
|
||||
from tamq.control import ControlModeClient, shell_quote
|
||||
from tamq.tmux import shell_join
|
||||
|
||||
|
||||
|
|
@ -10,3 +11,19 @@ def test_shell_quote():
|
|||
|
||||
def test_tmux_shell_join_quotes_arguments():
|
||||
assert shell_join(["tamq", "tap", "--repo", "net-kingdom", "--", "codex"]) == "tamq tap --repo net-kingdom -- codex"
|
||||
|
||||
|
||||
def test_pane_tty_is_resolved_through_tmux(monkeypatch):
|
||||
calls = []
|
||||
|
||||
def run(command, **kwargs):
|
||||
calls.append(command)
|
||||
return type("Result", (), {"returncode": 0, "stdout": "/dev/pts/7\n", "stderr": ""})()
|
||||
|
||||
monkeypatch.setattr(control.subprocess, "run", run)
|
||||
client = ControlModeClient("tamq", tmux_command=("tmux", "-L", "test"))
|
||||
assert client.pane_tty("tamq:audit-core") == "/dev/pts/7"
|
||||
assert calls == [[
|
||||
"tmux", "-L", "test", "display-message", "-p", "-t",
|
||||
"tamq:audit-core", "#{pane_tty}",
|
||||
]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue