diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-04-02 11:11:19 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-04-02 11:11:19 +0100 |
commit | fac792dc2714aa5a5d0d44aeacd7c53578486aae (patch) | |
tree | d1132f9bb19185b4d9fef9fce73fde6f7b0100ba /regress/cursor-test2.sh | |
parent | bbcfee362fdf8d39501131d3a3f8739dacd5c66e (diff) | |
download | rtmux-fac792dc2714aa5a5d0d44aeacd7c53578486aae.tar.gz rtmux-fac792dc2714aa5a5d0d44aeacd7c53578486aae.tar.bz2 rtmux-fac792dc2714aa5a5d0d44aeacd7c53578486aae.zip |
Update regress from master.
Diffstat (limited to 'regress/cursor-test2.sh')
-rw-r--r-- | regress/cursor-test2.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/regress/cursor-test2.sh b/regress/cursor-test2.sh new file mode 100644 index 00000000..9791f567 --- /dev/null +++ b/regress/cursor-test2.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 + +TMP=$(mktemp) +trap "rm -f $TMP" 0 1 15 + +$TMUX -f/dev/null new -d -x10 -y10 \ + "cat cursor-test.txt; printf '\e[8;10H'; cat" || exit 1 +$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 |