| 1475 | } |
| 1476 | |
| 1477 | func TestIncludesRelativePath(t *testing.T) { |
| 1478 | t.Parallel() |
| 1479 | |
| 1480 | const dir = "testdata/includes_rel_path" |
| 1481 | |
| 1482 | var buff bytes.Buffer |
| 1483 | e := task.NewExecutor( |
| 1484 | task.WithDir(dir), |
| 1485 | task.WithStdout(&buff), |
| 1486 | task.WithStderr(&buff), |
| 1487 | ) |
| 1488 | |
| 1489 | require.NoError(t, e.Setup()) |
| 1490 | |
| 1491 | require.NoError(t, e.Run(t.Context(), &task.Call{Task: "common:pwd"})) |
| 1492 | assert.Contains(t, filepath.ToSlash(buff.String()), "testdata/includes_rel_path/common") |
| 1493 | |
| 1494 | buff.Reset() |
| 1495 | require.NoError(t, e.Run(t.Context(), &task.Call{Task: "included:common:pwd"})) |
| 1496 | assert.Contains(t, filepath.ToSlash(buff.String()), "testdata/includes_rel_path/common") |
| 1497 | } |
| 1498 | |
| 1499 | func TestIncludesInternal(t *testing.T) { |
| 1500 | t.Parallel() |