summaryrefslogtreecommitdiff
path: root/t/README
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2010-08-06 21:19:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-18 19:42:04 (GMT)
commit93a5724613861e6cd85964c85f2fa0891caab258 (patch)
tree33a0e1d47bb638b277ac91a3e9b370f92506aad7 /t/README
parent8ef1abe5504acb22f6a3fd24a0fda8c4b9f172a5 (diff)
downloadgit-93a5724613861e6cd85964c85f2fa0891caab258.zip
git-93a5724613861e6cd85964c85f2fa0891caab258.tar.gz
git-93a5724613861e6cd85964c85f2fa0891caab258.tar.bz2
test-lib: Add support for multiple test prerequisites
Change the test_have_prereq function in test-lib.sh to support a comma-separated list of prerequisites. This is useful for tests that need e.g. both POSIXPERM and SANITY. The implementation was stolen from Junio C Hamano and Johannes Sixt, the tests and documentation were not. See the "Tests in Cygwin" thread in May 2009 for the originals: http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385 http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118434 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/README')
-rw-r--r--t/README6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/README b/t/README
index 0d1183c..d07b67a 100644
--- a/t/README
+++ b/t/README
@@ -350,6 +350,12 @@ library for your script to use.
test_expect_success TTY 'git --paginate rev-list uses a pager' \
' ... '
+ You can also supply a comma-separated list of prerequisites, in the
+ rare case where your test depends on more than one:
+
+ test_expect_success PERL,PYTHON 'yo dawg' \
+ ' test $(perl -E 'print eval "1 +" . qx[python -c "print 2"]') == "4" '
+
- test_expect_failure [<prereq>] <message> <script>
This is NOT the opposite of test_expect_success, but is used