Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2009-08-29 02:32:41 +0400
committerJunio C Hamano <gitster@pobox.com>2009-08-29 03:36:24 +0400
commit8648732e298b74b25171c97e6ea144818f29c403 (patch)
treee43615a1c769e570acaa9c79e4f47d8b01a0c99c /t/test-lib.sh
parentaab9ea1aad2447522928d7e9af0bb030558012cb (diff)
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>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index a5b8d03db0..f2ca536472 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -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*)