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

Method TestStatusEmptyDirty

worktree_test.go:1036–1053  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

1034}
1035
1036func (s *WorktreeSuite) TestStatusEmptyDirty(c *C) {
1037 fs := memfs.New()
1038 err := util.WriteFile(fs, "foo", []byte("foo"), 0755)
1039 c.Assert(err, IsNil)
1040
1041 storage := memory.NewStorage()
1042
1043 r, err := Init(storage, fs)
1044 c.Assert(err, IsNil)
1045
1046 w, err := r.Worktree()
1047 c.Assert(err, IsNil)
1048
1049 status, err := w.Status()
1050 c.Assert(err, IsNil)
1051 c.Assert(status.IsClean(), Equals, false)
1052 c.Assert(status, HasLen, 1)
1053}
1054
1055func (s *WorktreeSuite) TestReset(c *C) {
1056 fs := memfs.New()

Callers

nothing calls this directly

Calls 5

NewStorageFunction · 0.92
InitFunction · 0.85
WorktreeMethod · 0.80
StatusMethod · 0.45
IsCleanMethod · 0.45

Tested by

no test coverage detected