MCPcopy Create free account
hub / github.com/libgit2/git2go / TestReferenceNameIsValid

Function TestReferenceNameIsValid

reference_test.go:217–229  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

215}
216
217func TestReferenceNameIsValid(t *testing.T) {
218 t.Parallel()
219 valid, err := ReferenceNameIsValid("HEAD")
220 checkFatal(t, err)
221 if !valid {
222 t.Errorf("HEAD should be a valid reference name")
223 }
224 valid, err = ReferenceNameIsValid("HEAD1")
225 checkFatal(t, err)
226 if valid {
227 t.Errorf("HEAD1 should not be a valid reference name")
228 }
229}
230
231func TestReferenceNormalizeName(t *testing.T) {
232 t.Parallel()

Callers

nothing calls this directly

Calls 2

ReferenceNameIsValidFunction · 0.85
checkFatalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…