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:
authorJunio C Hamano <gitster@pobox.com>2020-11-26 02:24:54 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-26 02:24:54 +0300
commit7bd645e21d1ec66ec265d83e7f68e21086cc0a98 (patch)
tree1e9659022f63dc1a381edcb39dba6cf6a2578b47 /t/t0000-basic.sh
parentca065523c617fad68a4d85a971bbbe69125d93c1 (diff)
parent7f9c59ddb12377b787b9a0d4b79b68755541cf7f (diff)
Merge branch 'sg/tests-prereq'
A lazily defined test prerequisite can now be defined in terms of another lazily defined test prerequisite. * sg/tests-prereq: tests: fix description of 'test_set_prereq' tests: make sure nested lazy prereqs work reliably
Diffstat (limited to 't/t0000-basic.sh')
-rwxr-xr-xt/t0000-basic.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 22489c24dc..f4ba2e8c85 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -840,6 +840,27 @@ then
exit 1
fi
+test_lazy_prereq NESTED_INNER '
+ >inner &&
+ rm -f outer
+'
+test_lazy_prereq NESTED_PREREQ '
+ >outer &&
+ test_have_prereq NESTED_INNER &&
+ echo "can create new file in cwd" >file &&
+ test -f outer &&
+ test ! -f inner
+'
+test_expect_success NESTED_PREREQ 'evaluating nested lazy prereqs dont interfere with each other' '
+ nestedworks=yes
+'
+
+if test -z "$GIT_TEST_FAIL_PREREQS_INTERNAL" && test "$nestedworks" != yes
+then
+ say 'bug in test framework: nested lazy prerequisites do not work'
+ exit 1
+fi
+
test_expect_success 'lazy prereqs do not turn off tracing' "
run_sub_test_lib_test lazy-prereq-and-tracing \
'lazy prereqs and -x' -v -x <<-\\EOF &&