MCPcopy Create free account
hub / github.com/go-git/go-git / TestValidateGoodName

Method TestValidateGoodName

config/modules_test.go:96–105  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

94}
95
96func (s *ModulesSuite) TestValidateGoodName(c *C) {
97 for _, n := range []string{"foo", "lib-foo", "deps/x", "x.y"} {
98 m := &Submodule{
99 Name: n,
100 Path: "ok",
101 URL: "https://example.com/",
102 }
103 c.Assert(m.Validate(), IsNil, Commentf("name %q", n))
104 }
105}
106
107func (s *ModulesSuite) TestMarshal(c *C) {
108 input := []byte(`[submodule "qux"]

Callers

nothing calls this directly

Calls 1

ValidateMethod · 0.95

Tested by

no test coverage detected