diff options
| author | Meet Soni <meetsoni3017@gmail.com> | 2025-08-05 14:57:58 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-05 09:11:55 -0700 |
| commit | fed66d91c0fce8a1911b24ad79ed9f10d411874e (patch) | |
| tree | 937dd150664ce191a7a2a031a950dd986c092383 | |
| parent | aa91c5c57013bdeca7b58ee5044bf667a4757978 (diff) | |
| download | git-fed66d91c0fce8a1911b24ad79ed9f10d411874e.tar.gz | |
t: add test for git refs list subcommand
Add a test script, `t/t1461-refs-list.sh`, for the new `git refs list`
command.
This script acts as a simple driver, leveraging the shared test library
created in the preceding commit. It works by overriding the
`$git_for_each_ref` variable to "git refs list" and then sourcing the
shared library (`t/for-each-ref-tests.sh`).
This approach ensures that `git refs list` is tested against the
entire comprehensive test suite of `git for-each-ref`, verifying
that it acts as a compatible drop-in replacement.
Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: shejialuo <shejialuo@gmail.com>
Mentored-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rw-r--r-- | t/meson.build | 1 | ||||
| -rwxr-xr-x | t/t1461-refs-list.sh | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/t/meson.build b/t/meson.build index bbeba1a8d5..23a3702958 100644 --- a/t/meson.build +++ b/t/meson.build @@ -208,6 +208,7 @@ integration_tests = [ 't1450-fsck.sh', 't1451-fsck-buffer.sh', 't1460-refs-migrate.sh', + 't1461-refs-list.sh', 't1500-rev-parse.sh', 't1501-work-tree.sh', 't1502-rev-parse-parseopt.sh', diff --git a/t/t1461-refs-list.sh b/t/t1461-refs-list.sh new file mode 100755 index 0000000000..36e3d81e59 --- /dev/null +++ b/t/t1461-refs-list.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +test_description='git refs list tests' + +. ./test-lib.sh + +git_for_each_ref='git refs list' +. "$TEST_DIRECTORY"/for-each-ref-tests.sh |
