t5304: move prune -h test from t1517

t1517 is now focused on testing subcommands outside a repository.
Move the in-repo `-h` test for `prune` to t5304, which covers
this command.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Usman Akinyemi
2025-08-08 06:36:51 +05:30
committed by Junio C Hamano
parent 18aae638cb
commit 529a60a885
2 changed files with 5 additions and 7 deletions

View File

@@ -107,13 +107,6 @@ test_expect_success LIBCURL 'remote-http outside repository' '
test_grep "^error: remote-curl" actual
'
test_expect_success 'prune does not crash with -h' '
test_expect_code 129 git prune -h >usage &&
test_grep "[Uu]sage: git prune " usage &&
test_expect_code 129 nongit git prune -h >usage &&
test_grep "[Uu]sage: git prune " usage
'
for cmd in $(git --list-cmds=main)
do
cmd=${cmd%.*} # strip .sh, .perl, etc.

View File

@@ -364,4 +364,9 @@ test_expect_success 'gc.recentObjectsHook' '
git cat-file -p $BLOB
'
test_expect_success 'prune does not crash with -h' '
test_expect_code 129 git prune -h >usage &&
test_grep "[Uu]sage: git prune " usage
'
test_done