diff options
| author | Junio C Hamano <gitster@pobox.com> | 2012-11-29 12:52:45 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2012-11-29 12:52:45 -0800 |
| commit | 16e6e7284f691c8efc0a75cdecace83edbdedbaa (patch) | |
| tree | 483b390a4ba53adc595dcbd825ff57d650061bb0 /t/test-lib-functions.sh | |
| parent | 175bd3b0d0aef3af1bf2595840eebd7af9c1d1a5 (diff) | |
| parent | 59defcc36839d549a2db94b7569025ea3b4ec01a (diff) | |
| download | git-16e6e7284f691c8efc0a75cdecace83edbdedbaa.tar.gz | |
Merge branch 'jk/send-email-sender-prompt'
General clean-ups in various areas, originally written to support a
patch that later turned out to be unneeded.
* jk/send-email-sender-prompt:
t9001: check send-email behavior with implicit sender
t: add tests for "git var"
ident: keep separate "explicit" flags for author and committer
ident: make user_ident_explicitly_given static
t7502: factor out autoident prerequisite
test-lib: allow negation of prerequisites
Diffstat (limited to 't/test-lib-functions.sh')
| -rw-r--r-- | t/test-lib-functions.sh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 8889ba5104..22a4f8fb64 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -275,6 +275,15 @@ test_have_prereq () { for prerequisite do + case "$prerequisite" in + !*) + negative_prereq=t + prerequisite=${prerequisite#!} + ;; + *) + negative_prereq= + esac + case " $lazily_tested_prereq " in *" $prerequisite "*) ;; @@ -294,10 +303,20 @@ test_have_prereq () { total_prereq=$(($total_prereq + 1)) case "$satisfied_prereq" in *" $prerequisite "*) + satisfied_this_prereq=t + ;; + *) + satisfied_this_prereq= + esac + + case "$satisfied_this_prereq,$negative_prereq" in + t,|,t) ok_prereq=$(($ok_prereq + 1)) ;; *) - # Keep a list of missing prerequisites + # Keep a list of missing prerequisites; restore + # the negative marker if necessary. + prerequisite=${negative_prereq:+!}$prerequisite if test -z "$missing_prereq" then missing_prereq=$prerequisite |
