4 # TERM should come from outside tmux for if-shell from the config file
9 [ -z "$TEST_TMUX" ] && TEST_TMUX
=$
(readlink
-f ..
/tmux
)
10 TMUX
="$TEST_TMUX -Ltest"
11 $TMUX kill-server
2>/dev
/null
14 trap "rm -f $TMP" 0 1 15
17 if '[ "\$TERM" = "xterm" ]' \
18 'set -g default-terminal "vt220"' \
19 'set -g default-terminal "ansi"'
22 TERM
=xterm
$TMUX -f$TMP new
-d "echo \"#\$TERM\" >>$TMP" ||
exit 1
23 sleep 1 && [ "$(tail -1 $TMP)" = "#vt220" ] ||
exit 1
25 TERM
=screen
$TMUX -f$TMP new
-d "echo \"#\$TERM\" >>$TMP" ||
exit 1
26 sleep 1 && [ "$(tail -1 $TMP)" = "#ansi" ] ||
exit 1
28 $TMUX has
2>/dev
/null
&& exit 1