Skip to content

Commit

Permalink
Don't use a config file in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Apr 2, 2019
1 parent 79c3fd4 commit f03776c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions regress/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ all: $(TESTS)

$(TESTS):
sh $*.sh
sleep 1
4 changes: 2 additions & 2 deletions regress/control-client-size.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $TMUX kill-server 2>/dev/null
$TMUX -f/dev/null new -d || exit 1
sleep 1
cat <<EOF|$TMUX -C a >$TMP
cat <<EOF|$TMUX -f/dev/null -C a >$TMP
ls -F':#{window_width} #{window_height}'
refresh -C 80,24
ls -F':#{window_width} #{window_height}'
Expand All @@ -37,7 +37,7 @@ grep ^: $TMP >$OUT
printf ":80 24\n:80 23\n"|cmp -s $OUT - || exit 1
$TMUX kill-server 2>/dev/null
cat <<EOF|$TMUX -C new -x 100 -y 50 >$TMP
cat <<EOF|$TMUX -f/dev/null -C new -x 100 -y 50 >$TMP
ls -F':#{window_width} #{window_height}'
refresh -C 80,24
ls -F':#{window_width} #{window_height}'
Expand Down
5 changes: 3 additions & 2 deletions regress/cursor-test1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ PATH=/bin:/usr/bin
TERM=screen

[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
TMUX="$TEST_TMUX -Ltest"
TMUX="$TEST_TMUX -f/dev/null -Ltest"
$TMUX kill-server 2>/dev/null

TMP=$(mktemp)
trap "rm -f $TMP" 0 1 15

$TMUX new -d -x40 -y10 "cat cursor-test.txt; printf '\e[9;15H'; cat" || exit 1
$TMUX -f/dev/null new -d -x40 -y10 \
"cat cursor-test.txt; printf '\e[9;15H'; cat" || exit 1
$TMUX set -g window-size manual || exit 1

$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
Expand Down
3 changes: 2 additions & 1 deletion regress/cursor-test2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ $TMUX kill-server 2>/dev/null
TMP=$(mktemp)
trap "rm -f $TMP" 0 1 15

$TMUX new -d -x10 -y10 "cat cursor-test.txt; printf '\e[8;10H'; cat" || exit 1
$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
Expand Down
3 changes: 2 additions & 1 deletion regress/cursor-test3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ $TMUX kill-server 2>/dev/null
TMP=$(mktemp)
trap "rm -f $TMP" 0 1 15

$TMUX new -d -x7 -y2 "printf 'abcdefabcdefab'; printf '\e[2;7H'; cat" || exit 1
$TMUX -f/dev/null new -d -x7 -y2 \
"printf 'abcdefabcdefab'; printf '\e[2;7H'; cat" || exit 1
$TMUX set -g window-size manual || exit 1

$TMUX display -pF '#{cursor_x} #{cursor_y} #{cursor_character}' >>$TMP
Expand Down
2 changes: 1 addition & 1 deletion regress/cursor-test4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $TMUX kill-server 2>/dev/null
TMP=$(mktemp)
trap "rm -f $TMP" 0 1 15

$TMUX new -d -x10 -y3 "printf 'abcdef\n'; cat" || exit 1
$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
Expand Down
4 changes: 2 additions & 2 deletions regress/kill-session-process-exit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ TERM=screen
TMUX="$TEST_TMUX -Ltest"
$TMUX kill-server 2>/dev/null

$TMUX new -d 'sleep 1000' || exit 1
$TMUX -f/dev/null new -d 'sleep 1000' || exit 1
P=$($TMUX display -pt0:0.0 '#{pane_pid}')
$TMUX new -d || exit 1
$TMUX -f/dev/null new -d || exit 1
sleep 1
$TMUX kill-session -t0:
sleep 1
Expand Down

0 comments on commit f03776c

Please sign in to comment.