summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-02-17 10:03:41 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-17 10:03:41 -0800
commit7516977b4adc38937d95d8c7da8944153784bf9a (patch)
tree2903fd4f663bb9255f10bf696eba0c5eb41407ad
parentMerge branch 'aw/push-force-with-lease-reporting' into maint (diff)
parenttest-lib: limit the output of the yes utility (diff)
downloadtgif-7516977b4adc38937d95d8c7da8944153784bf9a.tar.xz
Merge branch 'js/test-lib-windows-emulated-yes' into maint
The emulated "yes" command used in our test scripts has been tweaked not to spend too much time generating unnecessary output that is not used, to help those who test on Windows where it would not stop until it fills the pipe buffer due to lack of SIGPIPE. * js/test-lib-windows-emulated-yes: test-lib: limit the output of the yes utility
-rw-r--r--t/test-lib.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index bd4b02e9db..51e4a88c33 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -907,9 +907,11 @@ yes () {
y="$*"
fi
- while echo "$y"
+ i=0
+ while test $i -lt 99
do
- :
+ echo "$y"
+ i=$(($i+1))
done
}