(t *testing.T)
| 789 | } |
| 790 | |
| 791 | func TestGitignoreTaskListFallback(t *testing.T) { //nolint:paralleltest // shares testdata/gitignore with TestGitignoreChecksum |
| 792 | const dir = "testdata/gitignore" |
| 793 | |
| 794 | var buff bytes.Buffer |
| 795 | e := task.NewExecutor( |
| 796 | task.WithDir(dir), |
| 797 | task.WithStdout(&buff), |
| 798 | task.WithStderr(&buff), |
| 799 | ) |
| 800 | require.NoError(t, e.Setup()) |
| 801 | |
| 802 | listed, err := e.CompiledTaskForTaskList(&task.Call{Task: "build"}) |
| 803 | require.NoError(t, err) |
| 804 | assert.True(t, listed.ShouldUseGitignore(), |
| 805 | "task list should reflect the global use_gitignore fallback") |
| 806 | |
| 807 | // "build-no-use_gitignore" explicitly disables it. |
| 808 | listedOff, err := e.CompiledTaskForTaskList(&task.Call{Task: "build-no-use_gitignore"}) |
| 809 | require.NoError(t, err) |
| 810 | assert.False(t, listedOff.ShouldUseGitignore(), |
| 811 | "explicit use_gitignore: false must be preserved in the list path") |
| 812 | } |
| 813 | |
| 814 | func TestStatusVariables(t *testing.T) { |
| 815 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…