1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-19 10:09:45 +02:00

Merge branch 'js/test-unset-prereq'

Test debugging aid.

* js/test-unset-prereq:
  tests: introduce test_unset_prereq, for debugging
This commit is contained in:
Junio C Hamano 2018-05-23 14:38:17 +09:00
commit 5002702e48

View File

@ -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=