Skip to content

Commit 6b1b17d

Browse files
committed
TestRefSelections: space out the test case table
I'm going to reuse this infrastructure for some more tests, so make the formatting less cramped.
1 parent 9a4dc3b commit 6b1b17d

File tree

1 file changed

+65
-18
lines changed

1 file changed

+65
-18
lines changed

git_sizer_test.go

Lines changed: 65 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -272,23 +272,70 @@ func TestRefSelections(t *testing.T) {
272272
name string
273273
args []string
274274
}{
275-
{"no arguments", nil}, // 0
276-
{"branches", []string{"--branches"}}, // 1
277-
{"no branches", []string{"--no-branches"}}, // 2
278-
{"tags", []string{"--tags"}}, // 3
279-
{"no tags", []string{"--no-tags"}}, // 4
280-
{"remotes", []string{"--remotes"}}, // 5
281-
{"no remotes", []string{"--no-remotes"}}, // 6
282-
{"notes", []string{"--notes"}}, // 7
283-
{"no notes", []string{"--no-notes"}}, // 8
284-
{"stash", []string{"--stash"}}, // 9
285-
{"no stash", []string{"--no-stash"}}, // 10
286-
{"branches and tags", []string{"--branches", "--tags"}}, // 11
287-
{"foo", []string{"--include-regexp", ".*foo.*"}}, // 12
288-
{"refs/foo as prefix", []string{"--include", "refs/foo"}}, // 13
289-
{"refs/foo as regexp", []string{"--include-regexp", "refs/foo"}}, // 14
290-
{"release tags", []string{"--include-regexp", "refs/tags/release-.*"}}, // 15
291-
{
275+
{ // 0
276+
name: "no arguments",
277+
},
278+
{ // 1
279+
name: "branches",
280+
args: []string{"--branches"},
281+
},
282+
{ // 2
283+
name: "no branches",
284+
args: []string{"--no-branches"},
285+
},
286+
{ // 3
287+
name: "tags",
288+
args: []string{"--tags"},
289+
},
290+
{ // 4
291+
name: "no tags",
292+
args: []string{"--no-tags"},
293+
},
294+
{ // 5
295+
name: "remotes",
296+
args: []string{"--remotes"},
297+
},
298+
{ // 6
299+
name: "no remotes",
300+
args: []string{"--no-remotes"},
301+
},
302+
{ // 7
303+
name: "notes",
304+
args: []string{"--notes"},
305+
},
306+
{ // 8
307+
name: "no notes",
308+
args: []string{"--no-notes"},
309+
},
310+
{ // 9
311+
name: "stash",
312+
args: []string{"--stash"},
313+
},
314+
{ // 10
315+
name: "no stash",
316+
args: []string{"--no-stash"},
317+
},
318+
{ // 11
319+
name: "branches and tags",
320+
args: []string{"--branches", "--tags"},
321+
},
322+
{ // 12
323+
name: "foo",
324+
args: []string{"--include-regexp", ".*foo.*"},
325+
},
326+
{ // 13
327+
name: "refs/foo as prefix",
328+
args: []string{"--include", "refs/foo"},
329+
},
330+
{ // 14
331+
name: "refs/foo as regexp",
332+
args: []string{"--include-regexp", "refs/foo"},
333+
},
334+
{ // 15
335+
name: "release tags",
336+
args: []string{"--include-regexp", "refs/tags/release-.*"},
337+
},
338+
{ // 16
292339
name: "combination",
293340
args: []string{
294341
"--include=refs/heads",
@@ -298,7 +345,7 @@ func TestRefSelections(t *testing.T) {
298345
"--exclude", "refs/foo",
299346
"--exclude-regexp", "refs/tags/release-.*",
300347
},
301-
}, // 16
348+
},
302349
} {
303350
t.Run(
304351
p.name,

0 commit comments

Comments
 (0)