(t *testing.T)
| 838 | } |
| 839 | |
| 840 | func TestIsValidGitHubRepositoryName(t *testing.T) { |
| 841 | tests := []struct { |
| 842 | name string |
| 843 | input string |
| 844 | want bool |
| 845 | }{ |
| 846 | { |
| 847 | name: "Valid short name", |
| 848 | input: "repo", |
| 849 | want: true, |
| 850 | }, |
| 851 | { |
| 852 | name: "Valid long hyphenated name", |
| 853 | input: "long-repository-name-with-many-hyphens-that-exceeds-thirty-nine-characters", |
| 854 | want: true, |
| 855 | }, |
| 856 | { |
| 857 | name: "Invalid too long name", |
| 858 | input: "this-repository-name-is-intentionally-very-long-to-exceed-the-github-repository-name-limit-of-one-hundred-characters-total", |
| 859 | want: false, |
| 860 | }, |
| 861 | { |
| 862 | name: "Invalid starts with hyphen", |
| 863 | input: "-repo", |
| 864 | want: false, |
| 865 | }, |
| 866 | } |
| 867 | |
| 868 | for _, tt := range tests { |
| 869 | t.Run(tt.name, func(t *testing.T) { |
| 870 | got := IsValidGitHubRepositoryName(tt.input) |
| 871 | if got != tt.want { |
| 872 | t.Errorf("IsValidGitHubRepositoryName() = %v, want %v", got, tt.want) |
| 873 | } |
| 874 | }) |
| 875 | } |
| 876 | } |
| 877 | |
| 878 | // TestParseGitHubURL_AdditionalEdgeCases tests additional edge cases for comprehensive coverage |
| 879 | func TestParseGitHubURL_AdditionalEdgeCases(t *testing.T) { |
nothing calls this directly
no test coverage detected