mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Add some tests.
This commit is contained in:
parent
d1497527c6
commit
5386e6583d
39
regress/control-client-size.sh
Normal file
39
regress/control-client-size.sh
Normal file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 947
|
||||
# size in control mode should change after refresh-client -C
|
||||
|
||||
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)
|
||||
OUT=$(mktemp)
|
||||
trap "rm -f $TMP $OUT" 0 1 15
|
||||
|
||||
$TMUX -f/dev/null new -d </dev/null || exit 1
|
||||
sleep 1
|
||||
cat <<EOF|$TMUX -C a >$TMP
|
||||
ls -F':#{session_width} #{session_height}'
|
||||
refresh -C 100,50
|
||||
ls -F':#{session_width} #{session_height}'
|
||||
EOF
|
||||
grep ^: $TMP >$OUT
|
||||
printf ":80 24\n:100 50\n"|cmp -s $OUT || exit 1
|
||||
$TMUX kill-server 2>/dev/null
|
||||
|
||||
$TMUX -f/dev/null new -d </dev/null || exit 1
|
||||
sleep 1
|
||||
cat <<EOF|$TMUX -C a >$TMP
|
||||
ls -F':#{session_width} #{session_height}'
|
||||
refresh -C 80,24
|
||||
ls -F':#{session_width} #{session_height}'
|
||||
EOF
|
||||
grep ^: $TMP >$OUT
|
||||
printf ":80 24\n:80 24\n"|cmp -s $OUT || exit 1
|
||||
$TMUX kill-server 2>/dev/null
|
||||
|
||||
exit 0
|
27
regress/new-session-size.sh
Normal file
27
regress/new-session-size.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
# new-session without clients should be the right size
|
||||
|
||||
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 </dev/null || exit 1
|
||||
sleep 1
|
||||
$TMUX ls -F "#{session_width} #{session_height}" >$TMP
|
||||
printf "80 24\n"|cmp -s $TMP || exit 1
|
||||
$TMUX kill-server 2>/dev/null
|
||||
|
||||
$TMUX -f/dev/null new -d -x 100 -y 50 </dev/null || exit 1
|
||||
sleep 1
|
||||
$TMUX ls -F "#{session_width} #{session_height}" >$TMP
|
||||
printf "100 50\n"|cmp -s $TMP || exit 1
|
||||
$TMUX kill-server 2>/dev/null
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user