| 29 | } |
| 30 | |
| 31 | func (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 | |
| 53 | func (s *SectionSuite) TestSection_IsName(c *C) { |
| 54 | sect := &Section{ |