@@ -100,12 +100,12 @@ unset CDPATH
100
100
unset GREP_OPTIONS
101
101
102
102
case $( echo $GIT_TRACE | tr " [A-Z]" " [a-z]" ) in
103
- 1|2|true)
104
- echo " * warning: Some tests will not work if GIT_TRACE" \
105
- " is set as to trace on STDERR ! *"
106
- echo " * warning: Please set GIT_TRACE to something" \
107
- " other than 1, 2 or true ! *"
108
- ;;
103
+ 1|2|true)
104
+ echo " * warning: Some tests will not work if GIT_TRACE" \
105
+ " is set as to trace on STDERR ! *"
106
+ echo " * warning: Please set GIT_TRACE to something" \
107
+ " other than 1, 2 or true ! *"
108
+ ;;
109
109
esac
110
110
111
111
# Convenience
172
172
esac
173
173
done
174
174
175
- if test -n " $color " ; then
175
+ if test -n " $color "
176
+ then
176
177
say_color () {
177
178
(
178
179
TERM=$ORIGINAL_TERM
179
180
export TERM
180
181
case " $1 " in
181
- error) tput bold; tput setaf 1;; # bold red
182
- skip) tput bold; tput setaf 2;; # bold green
183
- pass) tput setaf 2;; # green
184
- info) tput setaf 3;; # brown
185
- * ) test -n " $quiet " && return ;;
182
+ error)
183
+ tput bold; tput setaf 1;; # bold red
184
+ skip)
185
+ tput bold; tput setaf 2;; # bold green
186
+ pass)
187
+ tput setaf 2;; # green
188
+ info)
189
+ tput setaf 3;; # brown
190
+ * )
191
+ test -n " $quiet " && return ;;
186
192
esac
187
193
shift
188
194
printf " %s" " $* "
@@ -298,7 +304,8 @@ test_run_ () {
298
304
then
299
305
test_eval_ " $test_cleanup "
300
306
fi
301
- if test " $verbose " = " t" && test -n " $HARNESS_ACTIVE " ; then
307
+ if test " $verbose " = " t" && test -n " $HARNESS_ACTIVE "
308
+ then
302
309
echo " "
303
310
fi
304
311
return " $eval_ret "
@@ -346,7 +353,8 @@ test_at_end_hook_ () {
346
353
test_done () {
347
354
GIT_EXIT_OK=t
348
355
349
- if test -z " $HARNESS_ACTIVE " ; then
356
+ if test -z " $HARNESS_ACTIVE "
357
+ then
350
358
test_results_dir=" $TEST_OUTPUT_DIRECTORY /test-results"
351
359
mkdir -p " $test_results_dir "
352
360
test_results_path=" $test_results_dir /${0% .sh} -$$ .counts"
@@ -377,7 +385,8 @@ test_done () {
377
385
# Maybe print SKIP message
378
386
[ -z " $skip_all " ] || skip_all=" # SKIP $skip_all "
379
387
380
- if test $test_external_has_tap -eq 0; then
388
+ if test $test_external_has_tap -eq 0
389
+ then
381
390
say_color pass " # passed all $msg "
382
391
say " 1..$test_count$skip_all "
383
392
fi
@@ -391,7 +400,8 @@ test_done () {
391
400
exit 0 ;;
392
401
393
402
* )
394
- if test $test_external_has_tap -eq 0; then
403
+ if test $test_external_has_tap -eq 0
404
+ then
395
405
say_color error " # failed $test_failure among $msg "
396
406
say " 1..$test_count "
397
407
fi
@@ -471,22 +481,26 @@ then
471
481
PATH=$GIT_VALGRIND /bin:$PATH
472
482
GIT_EXEC_PATH=$GIT_VALGRIND /bin
473
483
export GIT_VALGRIND
474
- elif test -n " $GIT_TEST_INSTALLED " ; then
484
+ elif test -n " $GIT_TEST_INSTALLED "
485
+ then
475
486
GIT_EXEC_PATH=$( $GIT_TEST_INSTALLED /git --exec-path) ||
476
487
error " Cannot run git from $GIT_TEST_INSTALLED ."
477
488
PATH=$GIT_TEST_INSTALLED :$GIT_BUILD_DIR :$PATH
478
489
GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:- $GIT_EXEC_PATH }
479
490
else # normal case, use ../bin-wrappers only unless $with_dashes:
480
491
git_bin_dir=" $GIT_BUILD_DIR /bin-wrappers"
481
- if ! test -x " $git_bin_dir /git" ; then
482
- if test -z " $with_dashes " ; then
492
+ if ! test -x " $git_bin_dir /git"
493
+ then
494
+ if test -z " $with_dashes "
495
+ then
483
496
say " $git_bin_dir /git is not executable; using GIT_EXEC_PATH"
484
497
fi
485
498
with_dashes=t
486
499
fi
487
500
PATH=" $git_bin_dir :$PATH "
488
501
GIT_EXEC_PATH=$GIT_BUILD_DIR
489
- if test -n " $with_dashes " ; then
502
+ if test -n " $with_dashes "
503
+ then
490
504
PATH=" $GIT_BUILD_DIR :$PATH "
491
505
fi
492
506
fi
521
535
}
522
536
fi
523
537
524
- if ! test -x " $GIT_BUILD_DIR " /test-chmtime; then
538
+ if ! test -x " $GIT_BUILD_DIR " /test-chmtime
539
+ then
525
540
echo >&2 ' You need to build test-chmtime:'
526
541
echo >&2 ' Run "make test-chmtime" in the source (toplevel) directory'
527
542
exit 1
@@ -544,7 +559,8 @@ rm -fr "$test" || {
544
559
HOME=" $TRASH_DIRECTORY "
545
560
export HOME
546
561
547
- if test -z " $TEST_NO_CREATE_REPO " ; then
562
+ if test -z " $TEST_NO_CREATE_REPO "
563
+ then
548
564
test_create_repo " $test "
549
565
else
550
566
mkdir -p " $test "
0 commit comments