diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-23 14:38:17 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-23 14:38:17 +0900 |
commit | 5002702e487dc501702b29e768b78d5c22114425 (patch) | |
tree | e4774c365eb7b74b64f33329aea5cb013200dd76 /t | |
parent | Merge branch 'ab/perl-python-attrs' (diff) | |
parent | tests: introduce test_unset_prereq, for debugging (diff) | |
download | tgif-5002702e487dc501702b29e768b78d5c22114425.tar.xz |
Merge branch 'js/test-unset-prereq'
Test debugging aid.
* js/test-unset-prereq:
tests: introduce test_unset_prereq, for debugging
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib-functions.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index c55ef099c3..2b2181dca0 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -294,8 +294,20 @@ write_script () { # The single parameter is the prerequisite tag (a simple word, in all # capital letters by convention). +test_unset_prereq () { + ! test_have_prereq "$1" || + satisfied_prereq="${satisfied_prereq% $1 *} ${satisfied_prereq#* $1 }" +} + test_set_prereq () { - satisfied_prereq="$satisfied_prereq$1 " + case "$1" in + !*) + test_unset_prereq "${1#!}" + ;; + *) + satisfied_prereq="$satisfied_prereq$1 " + ;; + esac } satisfied_prereq=" " lazily_testable_prereq= lazily_tested_prereq= |