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-test4.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-test4.sh')
-rw-r--r-- | regress/cursor-test4.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/regress/cursor-test4.sh b/regress/cursor-test4.sh new file mode 100644 index 00000000..2bf1bb0e --- /dev/null +++ b/regress/cursor-test4.sh @@ -0,0 +1,31 @@ +#!/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 -y3 "printf 'abcdef\n'; 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 -x20 || exit 1 +$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP +$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP +$TMUX resizew -x3 || exit 1 +$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP +$TMUX capturep -p|awk '{print NR-1,$0}' >>$TMP +$TMUX resizew -x10 || 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-test4.result || exit 1 + +$TMUX kill-server 2>/dev/null +exit 0 |