(t *testing.T)
| 121 | } |
| 122 | |
| 123 | func TestHandleGitChanged(t *testing.T) { |
| 124 | dir := newGitRepo(t) |
| 125 | e, out := newGitTestEngine() |
| 126 | if err := e.Execute(context.Background(), "git-changed", []string{"--dir", dir}); err != nil { |
| 127 | t.Fatalf("git-changed: %v", err) |
| 128 | } |
| 129 | if !strings.Contains(out.String(), "untracked.txt") { |
| 130 | t.Errorf("changed output = %q", out.String()) |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | func TestHandleGit_BadFlag(t *testing.T) { |
| 135 | e, _ := newGitTestEngine() |
nothing calls this directly
no test coverage detected