git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/1] t2024: mark a `checkout -p` test as requiring Perl

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 23, 2018, 14:41 UTC
Message-ID
<8d46b31f5ad9925c8d1867c8db4fcbf86480d431.1535035282.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.20.v2.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

A recently-added test case tries to verify that the output of `checkout -p` contains a certain piece of advice.

But if Git was built without Perl and therefore lacks support for `git add -i`, the error output contains the hint that `-p` is not even available instead.

Let's just skip that test case altogether if Git was built with NO_PERL.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t2024-checkout-dwim.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh
index 26dc3f1fc0..29e1e25300 100755
--- a/t/t2024-checkout-dwim.sh
+++ b/t/t2024-checkout-dwim.sh
@@ -76,7 +76,8 @@ test_expect_success 'checkout of branch from multiple remotes fails #1' '
 	test_branch master
 '
 
-test_expect_success 'checkout of branch from multiple remotes fails with advice' '
+test_expect_success NO_PERL \
+	'checkout of branch from multiple remotes fails with advice' '
 	git checkout -B master &&
 	test_might_fail git branch -D foo &&
 	test_must_fail git checkout foo 2>stderr &&
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Ævar Arnfjörð Bjarmason
Message 2 of 4 in “Make t2024 NO_PERL-safe”
  1. 0/1 Make t2024 NO_PERL-safeJohannes Schindelin via GitGitGadget, Aug 23, 2018
  2. 1/1 t2024: mark a `checkout -p` test as requiring PerlJohannes Schindelin via GitGitGadget, Aug 23, 2018
  3. Ævar Arnfjörð BjarmasonAug 23, 2018
  4. Johannes SchindelinAug 23, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.