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

Method TestSubsections_GoString

plumbing/format/config/section_test.go:31–51  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

29}
30
31func (s *SectionSuite) TestSubsections_GoString(c *C) {
32 sects := Subsections{
33 &Subsection{
34 Options: []*Option{
35 {Key: "key1", Value: "value1"},
36 {Key: "key2", Value: "value2"},
37 {Key: "key1", Value: "value3"},
38 },
39 },
40 &Subsection{
41 Options: []*Option{
42 {Key: "key1", Value: "value1"},
43 {Key: "key2", Value: "value2"},
44 {Key: "key1", Value: "value3"},
45 },
46 },
47 }
48
49 expected := "&config.Subsection{Name:\"\", Options:&config.Option{Key:\"key1\", Value:\"value1\"}, &config.Option{Key:\"key2\", Value:\"value2\"}, &config.Option{Key:\"key1\", Value:\"value3\"}}, &config.Subsection{Name:\"\", Options:&config.Option{Key:\"key1\", Value:\"value1\"}, &config.Option{Key:\"key2\", Value:\"value2\"}, &config.Option{Key:\"key1\", Value:\"value3\"}}"
50 c.Assert(sects.GoString(), Equals, expected)
51}
52
53func (s *SectionSuite) TestSection_IsName(c *C) {
54 sect := &Section{

Callers

nothing calls this directly

Calls 1

GoStringMethod · 0.95

Tested by

no test coverage detected