TestGitignoreNegation checks that a `!pattern` in a nested .gitignore re-includes a file excluded by a parent .gitignore.
(t *testing.T)
| 728 | // TestGitignoreNegation checks that a `!pattern` in a nested .gitignore |
| 729 | // re-includes a file excluded by a parent .gitignore. |
| 730 | func TestGitignoreNegation(t *testing.T) { //nolint:paralleltest // mutates fixture files |
| 731 | gitignoreSeq{ |
| 732 | dir: "testdata/gitignore_negation", |
| 733 | task: "build", |
| 734 | create: map[string]string{"sub/debug.log": "debug\n", "sub/other.log": "other\n"}, |
| 735 | steps: []gitignoreStep{ |
| 736 | {run: "first run"}, |
| 737 | {run: "up to date"}, |
| 738 | {run: "ignored file modified", write: map[string]string{"sub/other.log": "other modified\n"}}, |
| 739 | {run: "reincluded file modified", write: map[string]string{"sub/debug.log": "debug modified\n"}}, |
| 740 | }, |
| 741 | }.run(t) |
| 742 | } |
| 743 | |
| 744 | // TestGitignoreNested checks that a .gitignore in a subdirectory below the task |
| 745 | // dir is honored when its files are reached by a deep glob. |
nothing calls this directly
no test coverage detected
searching dependent graphs…