(t *testing.T)
| 1479 | } |
| 1480 | |
| 1481 | func Test_ensurePrefixed(t *testing.T) { |
| 1482 | tests := []struct { |
| 1483 | name string |
| 1484 | input string |
| 1485 | expected string |
| 1486 | wantErr bool |
| 1487 | }{ |
| 1488 | { |
| 1489 | name: "missing gh- prefix", |
| 1490 | input: "bad-kitty", |
| 1491 | expected: "gh-bad-kitty", |
| 1492 | }, |
| 1493 | { |
| 1494 | name: "has gh- prefix", |
| 1495 | input: "gh-purrfect", |
| 1496 | expected: "gh-purrfect", |
| 1497 | }, |
| 1498 | } |
| 1499 | |
| 1500 | for _, tt := range tests { |
| 1501 | t.Run(tt.name, func(t *testing.T) { |
| 1502 | require.Equal(t, tt.expected, normalizeExtension(tt.input)) |
| 1503 | }) |
| 1504 | } |
| 1505 | } |
| 1506 | |
| 1507 | func fileNames(files []os.DirEntry) []string { |
| 1508 | names := make([]string, len(files)) |
nothing calls this directly
no test coverage detected