diff options
Diffstat (limited to 'tests/pi-live.sh')
| -rwxr-xr-x | tests/pi-live.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pi-live.sh b/tests/pi-live.sh index 04ef04a..3c8604d 100755 --- a/tests/pi-live.sh +++ b/tests/pi-live.sh @@ -302,6 +302,21 @@ expect "a run that works: done" "st fail" done 80 expect "with no failure" "t show -pv -t main:fail @dingger_error 2>/dev/null" "" t kill-window -t main:fail +# Its name is the session's, whatever the terminal title says. +t new-window -d -t main: -n named -c "$D/work3" +t send-keys -t main:named "pi $NO_MCP" Enter +expect "names: an agent of its own" "st named" idle 150 +name() { t show -pv -t main:named @agent_name 2>/dev/null; } +expect "an unnamed session: no name" name "" 30 +t select-pane -t main:named -T "π - Not its name - work3"; "$DINGGER" poke; sleep 1 +expect "a title cannot name it" name "" +type_line named "/name Find the sidecar" +expect "/name names it" name "Find the sidecar" 50 +t select-pane -t main:named -T "pi:c"; "$DINGGER" poke; sleep 1 +expect "a title written over keeps the name" name "Find the sidecar" +expect "the menu shows it" "\"$MENU\" --print | grep -c 'Find the sidecar'" 1 +t kill-window -t main:named + echo "2. screen detection (pi without the extension)" t send-keys -t main:plain "PI_CODING_AGENT_DIR=$D/agent-plain pi $NO_MCP" Enter expect "identified as pi" "t show -pv -t main:plain @agent 2>/dev/null" pi 150 |
