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

Method TestFileWriteClose

test/basic.go:235–243  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

233}
234
235func (s *BasicSuite) TestFileWriteClose(c *C) {
236 f, err := s.FS.Create("foo")
237 c.Assert(err, IsNil)
238
239 c.Assert(f.Close(), IsNil)
240
241 _, err = f.Write([]byte("foo"))
242 c.Assert(err, NotNil)
243}
244
245func (s *BasicSuite) TestFileRead(c *C) {
246 err := util.WriteFile(s.FS, "foo", []byte("foo"), 0644)

Callers

nothing calls this directly

Calls 3

WriteMethod · 0.80
CreateMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected