(t *testing.T)
| 240 | } |
| 241 | |
| 242 | func TestParseURLReportsMalformedInput(t *testing.T) { |
| 243 | // Given an SSH URL with a malformed bracketed host |
| 244 | rawURL := "ssh://git@[/tmp/git-repo" |
| 245 | |
| 246 | // When it is parsed |
| 247 | u, err := ParseURL(rawURL) |
| 248 | |
| 249 | // Then the malformed URL is rejected |
| 250 | require.Error(t, err) |
| 251 | assert.Nil(t, u) |
| 252 | } |