Merge branch 'obsd-master'
[tmux.git] / regress / new-session-size.sh
blob89fc580d618b50d319fb98b6054cf95c794e2512
1 #!/bin/sh
3 # new-session without clients should be the right size
5 PATH=/bin:/usr/bin
6 TERM=screen
8 [ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
9 TMUX="$TEST_TMUX -Ltest"
10 $TMUX kill-server 2>/dev/null
12 TMP=$(mktemp)
13 trap "rm -f $TMP" 0 1 15
15 $TMUX -f/dev/null new -d </dev/null || exit 1
16 sleep 1
17 $TMUX ls -F "#{window_width} #{window_height}" >$TMP
18 printf "80 24\n"|cmp -s $TMP - || exit 1
19 $TMUX kill-server 2>/dev/null
21 $TMUX -f/dev/null new -d -x 100 -y 50 </dev/null || exit 1
22 sleep 1
23 $TMUX ls -F "#{window_width} #{window_height}" >$TMP
24 printf "100 50\n"|cmp -s $TMP - || exit 1
25 $TMUX kill-server 2>/dev/null
27 exit 0