MCPcopy Index your code
hub / github.com/go-git/go-git / TestStatusEmptyDirty

Method TestStatusEmptyDirty

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

Source from the content-addressed store, hash-verified

1121}
1122
1123func (s *WorktreeSuite) TestStatusEmptyDirty(c *C) {
1124 fs := memfs.New()
1125 err := util.WriteFile(fs, "foo", []byte("foo"), 0755)
1126 c.Assert(err, IsNil)
1127
1128 storage := memory.NewStorage()
1129
1130 r, err := Init(storage, fs)
1131 c.Assert(err, IsNil)
1132
1133 w, err := r.Worktree()
1134 c.Assert(err, IsNil)
1135
1136 status, err := w.Status()
1137 c.Assert(err, IsNil)
1138 c.Assert(status.IsClean(), Equals, false)
1139 c.Assert(status, HasLen, 1)
1140}
1141
1142func (s *WorktreeSuite) TestStatusUnmodified(c *C) {
1143 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