(t *testing.T)
| 2626 | } |
| 2627 | |
| 2628 | func TestUserWorkingDirectoryWithIncluded(t *testing.T) { |
| 2629 | t.Parallel() |
| 2630 | |
| 2631 | wd, err := os.Getwd() |
| 2632 | require.NoError(t, err) |
| 2633 | |
| 2634 | wd = filepath.ToSlash(filepathext.SmartJoin(wd, "testdata/user_working_dir_with_includes/somedir")) |
| 2635 | |
| 2636 | var buff bytes.Buffer |
| 2637 | e := task.NewExecutor( |
| 2638 | task.WithDir("testdata/user_working_dir_with_includes"), |
| 2639 | task.WithStdout(&buff), |
| 2640 | task.WithStderr(&buff), |
| 2641 | ) |
| 2642 | e.UserWorkingDir = wd |
| 2643 | |
| 2644 | require.NoError(t, err) |
| 2645 | require.NoError(t, e.Setup()) |
| 2646 | require.NoError(t, e.Run(t.Context(), &task.Call{Task: "included:echo"})) |
| 2647 | // Normalize path separators for cross-platform compatibility (Windows uses backslashes) |
| 2648 | assert.Equal(t, fmt.Sprintf("%s\n", wd), normalizePathSeparators(buff.String())) |
| 2649 | } |
| 2650 | |
| 2651 | func TestPlatforms(t *testing.T) { |
| 2652 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…