Merge branch 'obsd-master'
[tmux.git] / regress / control-client-size.sh
blobdc275e529a82b66ee6af83dbd4e677c3dedce8cf
1 #!/bin/sh
3 # 947
4 # size in control mode should change after refresh-client -C, and -x and -y
5 # should work without -d for control clients
7 PATH=/bin:/usr/bin
8 TERM=screen
10 [ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
11 TMUX="$TEST_TMUX -Ltest"
12 $TMUX kill-server 2>/dev/null
14 TMP=$(mktemp)
15 OUT=$(mktemp)
16 trap "rm -f $TMP $OUT" 0 1 15
18 $TMUX -f/dev/null new -d || exit 1
19 sleep 1
20 cat <<EOF|$TMUX -C a >$TMP
21 ls -F':#{window_width} #{window_height}'
22 refresh -C 100,50
23 EOF
24 grep ^: $TMP >$OUT
25 $TMUX ls -F':#{window_width} #{window_height}' >>$OUT
26 printf ":80 24\n:100 50\n"|cmp -s $OUT - || exit 1
27 $TMUX kill-server 2>/dev/null
29 $TMUX -f/dev/null new -d || exit 1
30 sleep 1
31 cat <<EOF|$TMUX -f/dev/null -C a >$TMP
32 ls -F':#{window_width} #{window_height}'
33 refresh -C 80,24
34 EOF
35 grep ^: $TMP >$OUT
36 $TMUX ls -F':#{window_width} #{window_height}' >>$OUT
37 printf ":80 24\n:80 24\n"|cmp -s $OUT - || exit 1
38 $TMUX kill-server 2>/dev/null
40 cat <<EOF|$TMUX -f/dev/null -C new -x 100 -y 50 >$TMP
41 ls -F':#{window_width} #{window_height}'
42 refresh -C 80,24
43 EOF
44 grep ^: $TMP >$OUT
45 $TMUX ls -F':#{window_width} #{window_height}' >>$OUT
46 printf ":100 50\n:80 24\n"|cmp -s $OUT - || exit 1
47 $TMUX kill-server 2>/dev/null
49 exit 0