(c *C)
| 533 | } |
| 534 | |
| 535 | func (s *S) TestEncoderWriteError(c *C) { |
| 536 | enc := yaml.NewEncoder(errorWriter{}) |
| 537 | err := enc.Encode(map[string]string{"a": "b"}) |
| 538 | c.Assert(err, ErrorMatches, `yaml: write error: some write error`) // Data not flushed yet |
| 539 | } |
| 540 | |
| 541 | type errorWriter struct{} |
| 542 |