MCPcopy Create free account
hub / github.com/github/gh-aw / TestSpec_PublicAPI_IsValidGitHubRepositoryName

Function TestSpec_PublicAPI_IsValidGitHubRepositoryName

pkg/parser/spec_test.go:395–420  ·  view source on GitHub ↗

TestSpec_PublicAPI_IsValidGitHubRepositoryName validates the documented behavior of IsValidGitHubRepositoryName as described in the package README.md. Specification: Validates a GitHub repository name.

(t *testing.T)

Source from the content-addressed store, hash-verified

393//
394// Specification: Validates a GitHub repository name.
395func TestSpec_PublicAPI_IsValidGitHubRepositoryName(t *testing.T) {
396 tests := []struct {
397 name string
398 input string
399 expected bool
400 }{
401 {
402 name: "repo name over owner length and within 100 chars is valid",
403 input: "this-repository-name-is-significantly-longer-than-thirty-nine",
404 expected: true,
405 },
406 {
407 name: "repo name over 100 chars is invalid",
408 input: "this-repository-name-is-way-too-long-because-it-exceeds-one-hundred-characters-when-you-keep-adding-more",
409 expected: false,
410 },
411 }
412
413 for _, tt := range tests {
414 t.Run(tt.name, func(t *testing.T) {
415 result := IsValidGitHubRepositoryName(tt.input)
416 assert.Equal(t, tt.expected, result,
417 "IsValidGitHubRepositoryName(%q) should match documented behavior", tt.input)
418 })
419 }
420}
421
422// TestSpec_PublicAPI_IsMCPType validates the documented behavior of IsMCPType
423// as described in the package README.md.

Callers

nothing calls this directly

Calls 2

RunMethod · 0.45

Tested by

no test coverage detected