The test 'send-pack does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.
Move this test from "t/t5400-send-pack.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.
Suggested-by: Patrick Steinhardt <redacted>
Signed-off-by: Usman Akinyemi <redacted>
---
t/t1517-outside-repo.sh | 7 +++++++
t/t5400-send-pack.sh | 7 -------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 5b4373f8cd..a140b5cc38 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -142,4 +142,11 @@ test_expect_success 'pack-refs does not crash with -h' '
test_grep "[Uu]sage: git pack-refs " usage
'
+test_expect_success 'send-pack does not crash with -h' '
+ test_expect_code 129 git send-pack -h >usage &&
+ test_grep "[Uu]sage: git send-pack " usage &&
+ test_expect_code 129 nongit git send-pack -h >usage &&
+ test_grep "[Uu]sage: git send-pack " usage
+'
+
test_done
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 83b42ff073..571e8f1bc5 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -55,13 +55,6 @@ test_expect_success setup '
echo Rebase &&
git log'
-test_expect_success 'send-pack does not crash with -h' '
- test_expect_code 129 git send-pack -h >usage &&
- test_grep "[Uu]sage: git send-pack " usage &&
- test_expect_code 129 nongit git send-pack -h >usage &&
- test_grep "[Uu]sage: git send-pack " usage
-'
-
test_expect_success 'pack the source repository' '
git repack -a -d &&
git prune
--
2.50.0