[PATCH 3/3] t6132(NO_PERL): do not run the scripted `add -p`
- From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Aug 30, 2022, 13:54 UTC
- Message-ID
- <736f2dde6918822e5f8234dc8cddcb94aa3f92ac.1661867664.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1340.git.1661867664.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
When using the non-built-in version of `git add -p` in a `NO_PERL` build, we expect that invocation to fail.
However, when b02fdbc80a4 (pathspec: correct an empty string used as a pathspec element, 2022-05-29) added a test case to t6132 to exercise `git add -p`, it did not add appropriate prereqs (which admittedly did not exist back then).
Let's specify the appropriate prereqs.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- t/t6132-pathspec-exclude.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/t/t6132-pathspec-exclude.sh b/t/t6132-pathspec-exclude.sh index 9fdafeb1e90..cada952f9ae 100755 --- a/t/t6132-pathspec-exclude.sh +++ b/t/t6132-pathspec-exclude.sh @@ -293,7 +293,11 @@ test_expect_success 'add with all negative' ' test_cmp expect actual ' -test_expect_success 'add -p with all negative' ' +test_lazy_prereq ADD_I_USE_BUILTIN_OR_PERL ' + test_have_prereq ADD_I_USE_BUILTIN || test_have_prereq PERL +' + +test_expect_success ADD_I_USE_BUILTIN_OR_PERL 'add -p with all negative' ' H=$(git rev-parse HEAD) && git reset --hard $H && git clean -f &&
-- gitgitgadget