Skip to content

Commit

Permalink
Merge branch 'js/test-lib-windows-emulated-yes'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Feb 10, 2016
2 parents fb79532 + 6129c93 commit 4ecc59a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,11 @@ yes () {
y="$*"
fi

while echo "$y"
i=0
while test $i -lt 99
do
:
echo "$y"
i=$(($i+1))
done
}

Expand Down

0 comments on commit 4ecc59a

Please sign in to comment.