MCPcopy Create free account
hub / github.com/cli/cli / TestParseURLReportsMalformedInput

Function TestParseURLReportsMalformedInput

git/url_test.go:242–252  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

240}
241
242func 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}

Callers

nothing calls this directly

Calls 2

ParseURLFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected