diff options
Diffstat (limited to 'status_test.go')
| -rw-r--r-- | status_test.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/status_test.go b/status_test.go index a0ff1d3..228ee0e 100644 --- a/status_test.go +++ b/status_test.go @@ -23,29 +23,6 @@ func TestStatusFile(t *testing.T) { } } -func TestStatusForeach(t *testing.T) { - repo := createTestRepo(t) - defer repo.Free() - defer os.RemoveAll(repo.Workdir()) - - err := ioutil.WriteFile(path.Join(path.Dir(repo.Workdir()), "hello.txt"), []byte("Hello, World"), 0644) - checkFatal(t, err) - - statusFound := false - err = repo.StatusForeach(func (path string, statusFlags Status) int { - if path == "hello.txt" && statusFlags & StatusWtNew != 0 { - statusFound = true - } - - return 0 - }); - checkFatal(t, err) - - if !statusFound { - t.Fatal("Status callback not called with the new file") - } -} - func TestEntryCount(t *testing.T) { repo := createTestRepo(t) defer repo.Free() |
