#!/bin/sh # swap-pane swaps positions: the layout cell (and so floating or tiled), the # geometry, and the zoomed and hidden state belong to the position and stay # behind. Check this within a window and across windows. PATH=/bin:/usr/bin TERM=screen [ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux) TMUX="$TEST_TMUX -LtestA$$ -f/dev/null" trap '$TMUX kill-server 2>/dev/null' 0 trap 'exit 1' 1 2 15 fail() { echo "$*" >&2 exit 1 } run() { $TMUX "$@" || fail "failed: $*" } # check check() { got=$(run display-message -p -t "$1" \ '#{pane_floating_flag}:#{pane_zoomed_flag}:#{pane_hidden_flag}:#{window_index}') || exit 1 [ "$got" = "$2" ] || fail "$3: $1 got '$got', expected '$2'" } # checkwin