t1517 is now focused on testing subcommands outside a repository. Move the in-repo `-h` test for `update-server-info` to t5200, which covers this command. Suggested-by: Patrick Steinhardt <ps@xxxxxx> Helped-by: Junio C Hamano <gitster@xxxxxxxxx> Signed-off-by: Usman Akinyemi <usmanakinyemi202@xxxxxxxxx> --- t/t1517-outside-repo.sh | 6 +----- t/t5200-update-server-info.sh | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh index 4a827b96f0..3623272db3 100755 --- a/t/t1517-outside-repo.sh +++ b/t/t1517-outside-repo.sh @@ -107,17 +107,13 @@ test_expect_success LIBCURL 'remote-http outside repository' ' test_grep "^error: remote-curl" actual ' -test_expect_success 'update-server-info does not crash with -h' ' - test_expect_code 129 git update-server-info -h >usage && - test_grep "[Uu]sage: git update-server-info " usage -' - 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. diff --git a/t/t5200-update-server-info.sh b/t/t5200-update-server-info.sh index 8365907055..a551e955b5 100755 --- a/t/t5200-update-server-info.sh +++ b/t/t5200-update-server-info.sh @@ -46,4 +46,9 @@ test_expect_success 'midx does not create duplicate pack entries' ' test_must_be_empty dups ' +test_expect_success 'update-server-info does not crash with -h' ' + test_expect_code 129 git update-server-info -h >usage && + test_grep "[Uu]sage: git update-server-info " usage +' + test_done -- 2.50.1