From 026450c1a8ed64e49521bec676e2e1faba64c1aa Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 30 May 2019 07:52:24 +0100 Subject: [PATCH] Add test for xenl terminals. --- regress/command-order.sh | 6 ++---- regress/xenl-terminal.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 regress/xenl-terminal.sh diff --git a/regress/command-order.sh b/regress/command-order.sh index fb4e0324..04046f0d 100644 --- a/regress/command-order.sh +++ b/regress/command-order.sh @@ -1,7 +1,5 @@ #!/bin/sh -# new-session without clients should be the right size - PATH=/bin:/usr/bin TERM=screen @@ -19,6 +17,7 @@ EOF $TMUX -f$TMP start $TMP || exit 1 +$TMUX kill-server 2>/dev/null cat </dev/null cat <$TMP new -sfoo -nfoo0 @@ -40,6 +38,7 @@ EOF $TMUX -f$TMP start $TMP || exit 1 +$TMUX kill-server 2>/dev/null cat </dev/null exit 0 diff --git a/regress/xenl-terminal.sh b/regress/xenl-terminal.sh new file mode 100644 index 00000000..07469ceb --- /dev/null +++ b/regress/xenl-terminal.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +PATH=/bin:/usr/bin +TERM=screen + +[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux) +TMUX="$TEST_TMUX -Ltest" +$TMUX kill-server 2>/dev/null +TMUX2="$TEST_TMUX -Ltest2" +$TMUX2 kill-server 2>/dev/null + +TMP=$(mktemp) +trap "rm -f $TMP" 0 1 15 + +$TMUX2 -f/dev/null new -d || exit 1 +$TMUX2 set -as terminal-overrides ',*:xenl@' || exit 1 +$TMUX2 set -g status-right 'RRR' || exit 1 +$TMUX2 set -g status-left 'LLL' || exit 1 +$TMUX2 set -g window-status-current-format 'WWW' || exit 1 +$TMUX -f/dev/null new -x20 -y2 -d "$TMUX2 attach" || exit 1 +sleep 1 +$TMUX capturep -p|tail -1 >$TMP || exit 1 +$TMUX kill-server 2>/dev/null +$TMUX2 kill-server 2>/dev/null +cat <