MCPcopy Create free account
hub / github.com/go-task/task / TestIncludesRelativePath

Function TestIncludesRelativePath

task_test.go:1477–1497  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1475}
1476
1477func 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
1499func TestIncludesInternal(t *testing.T) {
1500 t.Parallel()

Callers

nothing calls this directly

Calls 3

SetupMethod · 0.95
RunMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…