diff options
author | vince <vincetiu8@gmail.com> | 2020-08-26 11:06:34 +0800 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-08-27 13:53:54 +0200 |
commit | b40ca794fe33a28f1ca4d6aedacc76b706ea8b04 (patch) | |
tree | aedcc77cbc552436d52df386ee38d162bbe52e0a /plumbing/format/config/common_test.go | |
parent | 576e1c63c4d08fca04cf060392a8c3d8b0bba89a (diff) | |
download | go-git-b40ca794fe33a28f1ca4d6aedacc76b706ea8b04.tar.gz |
Add tests
Diffstat (limited to 'plumbing/format/config/common_test.go')
-rw-r--r-- | plumbing/format/config/common_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plumbing/format/config/common_test.go b/plumbing/format/config/common_test.go index 365b53f..dca38df 100644 --- a/plumbing/format/config/common_test.go +++ b/plumbing/format/config/common_test.go @@ -64,6 +64,14 @@ func (s *CommonSuite) TestConfig_AddOption(c *C) { c.Assert(obtained, DeepEquals, expected) } +func (s *CommonSuite) TestConfig_HasSection(c *C) { + sect := New(). + AddOption("section1", "sub1", "key1", "value1"). + AddOption("section1", "sub2", "key1", "value1") + c.Assert(sect.HasSection("section1"), Equals, true) + c.Assert(sect.HasSection("section2"), Equals, false) +} + func (s *CommonSuite) TestConfig_RemoveSection(c *C) { sect := New(). AddOption("section1", NoSubsection, "key1", "value1"). |