--- extractVersionPrefix tests ---
(t *testing.T)
| 176 | // --- extractVersionPrefix tests --- |
| 177 | |
| 178 | func TestExtractVersionPrefix(t *testing.T) { |
| 179 | t.Parallel() |
| 180 | |
| 181 | tests := []struct { |
| 182 | filter string |
| 183 | want string |
| 184 | }{ |
| 185 | {`Version startsWith "gopls/"`, "gopls/"}, |
| 186 | {`Version startsWith 'cmd/'`, "cmd/"}, |
| 187 | {"", ""}, |
| 188 | {`Version contains "v1"`, ""}, |
| 189 | {` Version startsWith "tools/" `, "tools/"}, |
| 190 | } |
| 191 | |
| 192 | for _, tt := range tests { |
| 193 | t.Run(tt.filter, func(t *testing.T) { |
| 194 | t.Parallel() |
| 195 | assert.Equal(t, tt.want, extractVersionPrefix(tt.filter)) |
| 196 | }) |
| 197 | } |
| 198 | } |
nothing calls this directly
no test coverage detected