writeCommit writes content to name, stages it, and commits with msg.
(t *testing.T, repo, name, content, msg string)
| 39 | |
| 40 | // writeCommit writes content to name, stages it, and commits with msg. |
| 41 | func writeCommit(t *testing.T, repo, name, content, msg string) { |
| 42 | t.Helper() |
| 43 | if err := os.WriteFile(filepath.Join(repo, name), []byte(content), 0o644); err != nil { |
| 44 | t.Fatalf("write %s: %v", name, err) |
| 45 | } |
| 46 | runGitTest(t, repo, "add", name) |
| 47 | runGitTest(t, repo, "commit", "-q", "-m", msg) |
| 48 | } |
| 49 | |
| 50 | func TestResolveInput_Range(t *testing.T) { |
| 51 | repo := initBareRepo(t) |
no test coverage detected