(t *testing.T)
| 1403 | } |
| 1404 | |
| 1405 | func Test_ensurePrefixed(t *testing.T) { |
| 1406 | tests := []struct { |
| 1407 | name string |
| 1408 | input string |
| 1409 | expected string |
| 1410 | wantErr bool |
| 1411 | }{ |
| 1412 | { |
| 1413 | name: "missing gh- prefix", |
| 1414 | input: "bad-kitty", |
| 1415 | expected: "gh-bad-kitty", |
| 1416 | }, |
| 1417 | { |
| 1418 | name: "has gh- prefix", |
| 1419 | input: "gh-purrfect", |
| 1420 | expected: "gh-purrfect", |
| 1421 | }, |
| 1422 | } |
| 1423 | |
| 1424 | for _, tt := range tests { |
| 1425 | t.Run(tt.name, func(t *testing.T) { |
| 1426 | require.Equal(t, tt.expected, normalizeExtension(tt.input)) |
| 1427 | }) |
| 1428 | } |
| 1429 | } |
| 1430 | |
| 1431 | func fileNames(files []os.DirEntry) []string { |
| 1432 | names := make([]string, len(files)) |
nothing calls this directly
no test coverage detected