@@ -22,7 +22,7 @@ dump_logs()
2222 dir=$1
2323 shift
2424 testname=$( basename " $dir " .d)
25- for logfile in $dir /* .tmux.log; do
25+ for logfile in " $dir " /* .tmux.log; do
2626 printf " travis_fold:start:%s-%s\n" " $testname " " $( basename " $logfile " ) "
2727 cat " $logfile "
2828 printf " travis_fold:end:%s-%s\n" " $testname " " $( basename " $logfile " ) "
@@ -60,7 +60,7 @@ test_exitstatus()
6060ssh_localhost_check ()
6161{
6262 ssh localhost :
63- if [ $? -ne 0 ]; then
63+ if [ " $? " -ne 0 ]; then
6464 error " ssh to localhost failed\n"
6565 return 1
6666 fi
@@ -93,7 +93,7 @@ if [ -z "$srcdir" ]; then
9393 export srcdir=$PWD
9494else
9595 srcdir=" $( cd " $srcdir " && pwd) "
96- if [ $? -ne 0 ]; then
96+ if [ " $? " -ne 0 ]; then
9797 error " can't cd to srcdir: %s\n" " $srcdir "
9898 exit 99
9999 fi
@@ -113,7 +113,7 @@ case "$(basename "$0")" in
113113 ;;
114114esac
115115
116- if [ $# -lt 2 ]; then
116+ if [ " $# " -lt 2 ]; then
117117 test_error " not enough args\n"
118118fi
119119
@@ -144,10 +144,10 @@ mkdir "${test_dir}"
144144
145145on_exit () {
146146 rv=$?
147- if test $rv -ne 0; then
147+ if test " $rv " -ne 0; then
148148 dump_logs " $test_dir " $test_args
149149 fi
150- exit $rv
150+ exit " $rv "
151151}
152152trap on_exit EXIT
153153
@@ -219,7 +219,7 @@ for run in $server_tests; do
219219 ${tmux_stdin} tmux -f /dev/null -S " ${tmux_socket} " -C new-session -x 80 -y 24 " ${srcdir} /print-exitstatus ${client_wrapper} ${sut} ${server_wrapper} \" ${PWD} /${test_dir} /${run} \" \" ${PWD} /${test_script} ${run} \" " > " ${test_dir} /${run} .tmux.log"
220220 rv=$?
221221 rm -f " ${tmux_socket} " " ${test_dir} /tmux-socket"
222- if [ $rv -ne 0 ]; then
222+ if [ " $rv " -ne 0 ]; then
223223 test_error " tmux failure on test %s\n" " $run "
224224 fi
225225 # Check for mosh failures
@@ -282,7 +282,7 @@ for compare in $compare_tests; do
282282 desired=n
283283 badresult=different
284284 fi
285- if [ $differ != $desired ]; then
285+ if [ " $differ " != " $desired " ]; then
286286 test_failure " Output is %s between tests %s and %s\n" " $badresult " " $test1 " " $test2 "
287287 fi
288288done
291291if [ -n " $post " ]; then
292292 " ${test_script} " post
293293 status=$?
294- if [ $status -ne 0 ]; then
295- test_exitstatus $status " Post test failed with exitstatus %d\n" $status
294+ if [ " $status " -ne 0 ]; then
295+ test_exitstatus " $status " " Post test failed with exitstatus %d\n" " $status "
296296 fi
297297fi
0 commit comments