mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
t/test-lib.sh: provide a shell implementation of the 'yes' utility
Some platforms (IRIX 6.5, Solaris 7) do not provide the 'yes' utility. Currently, some tests, including t7610 and t9001, try to call this program. Due to the way the tests are structured, the tests still pass even though this program is missing. Rather than succeeding by chance, let's provide an implementation of the simple 'yes' utility in shell for all platforms to use. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
aab9ea1aad
commit
8648732e29
|
@ -685,6 +685,21 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
# Provide an implementation of the 'yes' utility
|
||||
yes () {
|
||||
if test $# = 0
|
||||
then
|
||||
y=y
|
||||
else
|
||||
y="$*"
|
||||
fi
|
||||
|
||||
while echo "$y"
|
||||
do
|
||||
:
|
||||
done
|
||||
}
|
||||
|
||||
# Fix some commands on Windows
|
||||
case $(uname -s) in
|
||||
*MINGW*)
|
||||
|
|
Loading…
Reference in a new issue