(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestStatusFile(t *testing.T) { |
| 10 | t.Parallel() |
| 11 | repo := createTestRepo(t) |
| 12 | defer cleanupTestRepo(t, repo) |
| 13 | |
| 14 | state := repo.State() |
| 15 | if state != RepositoryStateNone { |
| 16 | t.Fatal("Incorrect repository state: ", state) |
| 17 | } |
| 18 | |
| 19 | err := ioutil.WriteFile(path.Join(path.Dir(repo.Workdir()), "hello.txt"), []byte("Hello, World"), 0644) |
| 20 | checkFatal(t, err) |
| 21 | |
| 22 | status, err := repo.StatusFile("hello.txt") |
| 23 | checkFatal(t, err) |
| 24 | |
| 25 | if status != StatusWtNew { |
| 26 | t.Fatal("Incorrect status flags: ", status) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func TestStatusList(t *testing.T) { |
| 31 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…