(t *testing.T)
| 146 | } |
| 147 | |
| 148 | func TestIsShortcutFile(t *testing.T) { |
| 149 | tests := []struct { |
| 150 | name string |
| 151 | path string |
| 152 | want bool |
| 153 | }{ |
| 154 | { |
| 155 | name: "a .url file", |
| 156 | path: "oauth-runbook.url", |
| 157 | want: true, |
| 158 | }, |
| 159 | { |
| 160 | name: "any case, as on Windows", |
| 161 | path: "docs/OAuth-Runbook.URL", |
| 162 | want: true, |
| 163 | }, |
| 164 | { |
| 165 | name: "a Markdown file", |
| 166 | path: "signin-plan.md", |
| 167 | }, |
| 168 | { |
| 169 | name: "url elsewhere in the name", |
| 170 | path: "url-notes.md", |
| 171 | }, |
| 172 | { |
| 173 | name: "no extension", |
| 174 | path: "url", |
| 175 | }, |
| 176 | } |
| 177 | |
| 178 | for _, tt := range tests { |
| 179 | t.Run(tt.name, func(t *testing.T) { |
| 180 | assert.Equal(t, tt.want, IsShortcutFile(tt.path)) |
| 181 | }) |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | func TestIsHTMLFile(t *testing.T) { |
| 186 | tests := []struct { |
nothing calls this directly
no test coverage detected