2019-04-02 08:36:20 +00:00
|
|
|
#!/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
|
|
|
|
|
|
|
|
TMP=$(mktemp)
|
|
|
|
trap "rm -f $TMP" 0 1 15
|
|
|
|
|
2019-04-02 08:48:26 +00:00
|
|
|
$TMUX -f/dev/null new -d -x10 -y10 \
|
|
|
|
"cat cursor-test.txt; printf '\e[8;10H'; cat" || exit 1
|
2019-04-02 08:36:20 +00:00
|
|
|
$TMUX set -g window-size manual || exit 1
|
|
|
|
|
|
|
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
|
|
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
|
|
|
$TMUX resizew -x5 || exit 1
|
|
|
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
|
|
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
|
|
|
$TMUX resizew -x50 || exit 1
|
|
|
|
$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
|
|
|
|
$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP
|
|
|
|
|
|
|
|
cmp -s $TMP cursor-test2.result || exit 1
|
|
|
|
|
|
|
|
$TMUX kill-server 2>/dev/null
|
|
|
|
exit 0
|