Skip to content

Commit 81d0073

Browse files
committed
t: add test for git refs list subcommand
Adapt `t/t6300-for-each-ref.sh` to invoke ${GIT_REFS_LIST_CMD}, defaulting to `for-each-ref` if the variable is unset. Add `t/t1461-refs-list.sh` to test git refs list by setting `GIT_REFS_LIST_CMD` to `refs list` and sourcing `t/t6300-for-each-ref.sh` 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>
1 parent e437b43 commit 81d0073

File tree

3 files changed

+184
-163
lines changed

3 files changed

+184
-163
lines changed

t/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ integration_tests = [
224224
't1450-fsck.sh',
225225
't1451-fsck-buffer.sh',
226226
't1460-refs-migrate.sh',
227+
't1461-refs-list.sh',
227228
't1500-rev-parse.sh',
228229
't1501-work-tree.sh',
229230
't1502-rev-parse-parseopt.sh',

t/t1461-refs-list.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
test_description='git refs list tests'
4+
5+
. ./test-lib.sh
6+
7+
GIT_REFS_LIST_CMD='refs list'
8+
. "$TEST_DIRECTORY"/t6300-for-each-ref.sh

0 commit comments

Comments
 (0)