From f03776c262ff68f4f5c3fefefd559256d534179d Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 2 Apr 2019 09:48:26 +0100 Subject: [PATCH] Don't use a config file in tests. --- regress/Makefile | 1 + regress/control-client-size.sh | 4 ++-- regress/cursor-test1.sh | 5 +++-- regress/cursor-test2.sh | 3 ++- regress/cursor-test3.sh | 3 ++- regress/cursor-test4.sh | 2 +- regress/kill-session-process-exit.sh | 4 ++-- 7 files changed, 13 insertions(+), 9 deletions(-) diff --git a/regress/Makefile b/regress/Makefile index 3775a711..e6c3619f 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -7,3 +7,4 @@ all: $(TESTS) $(TESTS): sh $*.sh + sleep 1 diff --git a/regress/control-client-size.sh b/regress/control-client-size.sh index b8d9aef0..dd1850c5 100644 --- a/regress/control-client-size.sh +++ b/regress/control-client-size.sh @@ -28,7 +28,7 @@ $TMUX kill-server 2>/dev/null $TMUX -f/dev/null new -d || exit 1 sleep 1 -cat <$TMP +cat <$TMP ls -F':#{window_width} #{window_height}' refresh -C 80,24 ls -F':#{window_width} #{window_height}' @@ -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 <$TMP +cat <$TMP ls -F':#{window_width} #{window_height}' refresh -C 80,24 ls -F':#{window_width} #{window_height}' diff --git a/regress/cursor-test1.sh b/regress/cursor-test1.sh index d34f9923..2dc20539 100644 --- a/regress/cursor-test1.sh +++ b/regress/cursor-test1.sh @@ -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 diff --git a/regress/cursor-test2.sh b/regress/cursor-test2.sh index c8640632..9791f567 100644 --- a/regress/cursor-test2.sh +++ b/regress/cursor-test2.sh @@ -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 diff --git a/regress/cursor-test3.sh b/regress/cursor-test3.sh index bcf2898f..8bb4bd6f 100644 --- a/regress/cursor-test3.sh +++ b/regress/cursor-test3.sh @@ -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 diff --git a/regress/cursor-test4.sh b/regress/cursor-test4.sh index 86c14979..2bf1bb0e 100644 --- a/regress/cursor-test4.sh +++ b/regress/cursor-test4.sh @@ -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 diff --git a/regress/kill-session-process-exit.sh b/regress/kill-session-process-exit.sh index 27d883e2..69ee27a2 100644 --- a/regress/kill-session-process-exit.sh +++ b/regress/kill-session-process-exit.sh @@ -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