From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im, chriscool@tuxfamily.org, christian.couder@gmail.com,
gitster@pobox.com, me@ttaylorr.com, usmanakinyemi202@gmail.com
Subject: [PATCH 4/7] t/t1517: move pack-refs -h test to t1517
Date: Mon, 7 Jul 2025 02:37:22 +0530 [thread overview]
Message-ID: <20250706210725.79903-5-usmanakinyemi202@gmail.com> (raw)
In-Reply-To: <20250706210725.79903-1-usmanakinyemi202@gmail.com>
The test 'pack-refs 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 "t0610-reftable-basics.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.
Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
t/t0610-reftable-basics.sh | 7 -------
t/t1517-outside-repo.sh | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh
index 3ea5d51532..ffd8ecc0ce 100755
--- a/t/t0610-reftable-basics.sh
+++ b/t/t0610-reftable-basics.sh
@@ -14,13 +14,6 @@ export GIT_TEST_DEFAULT_REF_FORMAT
INVALID_OID=$(test_oid 001)
-test_expect_success 'pack-refs does not crash with -h' '
- test_expect_code 129 git pack-refs -h >usage &&
- test_grep "[Uu]sage: git pack-refs " usage &&
- test_expect_code 129 nongit git pack-refs -h >usage &&
- test_grep "[Uu]sage: git pack-refs " usage
-'
-
test_expect_success 'init: creates basic reftable structures' '
test_when_finished "rm -rf repo" &&
git init repo &&
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index e04be2d811..5b4373f8cd 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -135,4 +135,11 @@ test_expect_success 'ls-files does not crash with -h' '
test_grep "[Uu]sage: git ls-files " usage
'
+test_expect_success 'pack-refs does not crash with -h' '
+ test_expect_code 129 git pack-refs -h >usage &&
+ test_grep "[Uu]sage: git pack-refs " usage &&
+ test_expect_code 129 nongit git pack-refs -h >usage &&
+ test_grep "[Uu]sage: git pack-refs " usage
+'
+
test_done
--
2.50.0
next prev parent reply other threads:[~2025-07-06 21:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-06 21:07 [PATCH 0/7] move builtin help test to t1517 Usman Akinyemi
2025-07-06 21:07 ` [PATCH 1/7] t/t1517: move checkout-index -h " Usman Akinyemi
2025-07-06 21:07 ` [PATCH 2/7] t/t1517: move for-each-ref " Usman Akinyemi
2025-07-06 21:07 ` [PATCH 3/7] t/t1517: move ls-files " Usman Akinyemi
2025-07-06 21:07 ` Usman Akinyemi [this message]
2025-07-06 21:07 ` [PATCH 5/7] t/t1517: move send-pack " Usman Akinyemi
2025-07-06 21:07 ` [PATCH 6/7] t/t1517: move verify-commit " Usman Akinyemi
2025-07-06 21:07 ` [PATCH 7/7] t/t1517: move verify-tag " Usman Akinyemi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250706210725.79903-5-usmanakinyemi202@gmail.com \
--to=usmanakinyemi202@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).