mirror of
https://github.com/tmux/tmux.git
synced 2026-10-13 06:04:34 +00:00
Add test for killing own session crash.
This commit is contained in:
@@ -378,4 +378,23 @@ done
|
||||
[ "$i" -lt 50 ] || fail "tagged windows were not killed"
|
||||
exit_mode q
|
||||
|
||||
# --- killing the mode's own session -----------------------------------------
|
||||
# Killing the attached session also destroys the pane hosting the tree. The
|
||||
# confirmation callback must finish without redrawing the destroyed mode.
|
||||
$TMUX set-option -g detach-on-destroy off || exit 1
|
||||
$TMUX choose-tree -s -t aaa:0 -F 'G7' -O name || exit 1
|
||||
wait_count ': G7' 2
|
||||
$TMUX send-keys -t aaa:0 g x || fail "send-keys session kill failed"
|
||||
wait_for 'Kill session aaa'
|
||||
$TMUX send-keys -t aaa:0 y || fail "session kill confirmation failed"
|
||||
i=0
|
||||
while [ "$i" -lt 50 ]; do
|
||||
sessions=$($TMUX list-sessions -F '#{session_name}' 2>/dev/null)
|
||||
client_session=$($TMUX list-clients -F '#{client_session}' 2>/dev/null)
|
||||
[ "$sessions" = 'zzz' ] && [ "$client_session" = 'zzz' ] && break
|
||||
sleep 0.2
|
||||
i=$((i + 1))
|
||||
done
|
||||
[ "$i" -lt 50 ] || fail "killing the tree session killed the server"
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user