| 2649 | } |
| 2650 | |
| 2651 | func TestPlatforms(t *testing.T) { |
| 2652 | t.Parallel() |
| 2653 | |
| 2654 | var buff bytes.Buffer |
| 2655 | e := task.NewExecutor( |
| 2656 | task.WithDir("testdata/platforms"), |
| 2657 | task.WithStdout(&buff), |
| 2658 | task.WithStderr(&buff), |
| 2659 | ) |
| 2660 | require.NoError(t, e.Setup()) |
| 2661 | require.NoError(t, e.Run(t.Context(), &task.Call{Task: "build-" + runtime.GOOS})) |
| 2662 | assert.Equal(t, fmt.Sprintf("task: [build-%s] echo 'Running task on %s'\nRunning task on %s\n", runtime.GOOS, runtime.GOOS, runtime.GOOS), buff.String()) |
| 2663 | } |
| 2664 | |
| 2665 | func TestPOSIXShellOptsGlobalLevel(t *testing.T) { |
| 2666 | t.Parallel() |