Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Blame · internal/format/format_test.go

Line attribution on main · 21 line(s)

214e7ea6
Keenan Nemetz
17d ago
1 package format
2
3 import "testing"
4
5 func TestNamesJoinsLikeASentence(t *testing.T) {
6 t.Parallel()
7 cases := []struct {
8 in []string
9 want string
10 }{
11 {nil, ""},
12 {[]string{"stable"}, "stable"},
13 {[]string{"stable", "beta"}, "stable and beta"},
14 {[]string{"stable", "beta", "nightly"}, "stable, beta and nightly"},
15 }
16 for _, c := range cases {
17 if got := Names(c.in); got != c.want {
18 t.Fatalf("Names(%v) = %q, want %q", c.in, got, c.want)
19 }
20 }
21 }