t2024: mark test using "checkout -p" with PERL prerequisite
PATCH 1/1 t2024: mark test using "checkout -p" with PERL prerequisite
checkout with the -p switch uses the "add interactive" framework which is written in Perl. Add a PERL prerequisite to skip this test when built with NO_PERL.
--- t/t2024-checkout-dwim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
t/t2024-checkout-dwim.sh +1 -1
@@ -75,7 +75,7 @@ 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 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 &&
Signature · 1 line
2.14.3 (Apple Git-98)
PATCH 1/1 t2024: mark test using "checkout -p" with PERL prerequisite
Checkout with the -p switch uses the "add interactive" framework which is written in Perl.
One test added in 8d7b558bae ("checkout & worktree: introduce checkout.defaultRemote", 2018-06-05) didn't declare the PERL prerequisite, breaking the test when built with NO_PERL.
---
Quoted 3 lines · CB Bailey
checkout with the -p switch uses the "add interactive" framework which is written in Perl. Add a PERL prerequisite to skip this test when built with
NO_PERL.
Thanks, and sorry about my buggy code. I didn't consider the interaction between -p and NO_PERL.
Your patch works, but I think just splitting the test up is better, so we're not skipping things unrelated to "checkout -p" under NO_PERL.
I added your SOB since I stole significant parts of your commit message.
Junio: We'd want one patch or the other before 2.19 so that release doesn't break tests under NO_PERL.
t/t2024-checkout-dwim.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
t/t2024-checkout-dwim.sh +7 -2
@@ -86,8 +86,13 @@ test_expect_success 'checkout of branch from multiple remotes fails with advice' checkout foo 2>stderr && test_branch master && status_uno_is_clean && - test_i18ngrep ! "^hint: " stderr && - # Make sure the likes of checkout -p do not print this hint + test_i18ngrep ! "^hint: " stderr +' + +test_expect_success PERL 'checkout -p with multiple remotes does not print advice' ' + git checkout -B master && + test_might_fail git branch -D foo && + git checkout -p foo 2>stderr && test_i18ngrep ! "^hint: " stderr && status_uno_is_clean
Signature · 1 line
2.18.0.865.gffc8e1a3cd6