]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5304: move `prune -h` test from t1517
authorUsman Akinyemi <usmanakinyemi202@gmail.com>
Fri, 8 Aug 2025 01:06:51 +0000 (06:36 +0530)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Aug 2025 14:48:27 +0000 (07:48 -0700)
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>
t/t1517-outside-repo.sh
t/t5304-prune.sh

index 4eba3f486d733dd52e66ff018d48d31e6850617a..3dc602872a00379ef24aee550ee1491c7cb8ed38 100755 (executable)
@@ -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.
index 1f1f664871ece6dba57e6bb601ba3771f490e2eb..2be7cd30dece6e6eeb6d1a59083e4dbc707c92dc 100755 (executable)
@@ -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