From ac095bb12c4d29722b60ba9f20590fa7cfa6bc7d Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 8 Nov 2016 23:46:38 +0100 Subject: new plumbing package (#118) * plumbing: now core was renamed to core, and formats and clients moved inside --- plumbing/format/config/encoder_test.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plumbing/format/config/encoder_test.go (limited to 'plumbing/format/config/encoder_test.go') diff --git a/plumbing/format/config/encoder_test.go b/plumbing/format/config/encoder_test.go new file mode 100644 index 0000000..5335b83 --- /dev/null +++ b/plumbing/format/config/encoder_test.go @@ -0,0 +1,21 @@ +package config + +import ( + "bytes" + + . "gopkg.in/check.v1" +) + +type EncoderSuite struct{} + +var _ = Suite(&EncoderSuite{}) + +func (s *EncoderSuite) TestEncode(c *C) { + for idx, fixture := range fixtures { + buf := &bytes.Buffer{} + e := NewEncoder(buf) + err := e.Encode(fixture.Config) + c.Assert(err, IsNil, Commentf("encoder error for fixture: %d", idx)) + c.Assert(buf.String(), Equals, fixture.Text, Commentf("bad result for fixture: %d", idx)) + } +} -- cgit