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

Function TestAbsPath

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

Source from the content-addressed store, hash-verified

2779}
2780
2781func TestAbsPath(t *testing.T) {
2782 t.Parallel()
2783
2784 var buff bytes.Buffer
2785 e := task.NewExecutor(
2786 task.WithDir("testdata/abs_path"),
2787 task.WithStdout(&buff),
2788 task.WithStderr(&buff),
2789 task.WithSilent(true),
2790 )
2791 require.NoError(t, e.Setup())
2792
2793 err := e.Run(t.Context(), &task.Call{Task: "default"})
2794 require.NoError(t, err)
2795
2796 cwd, err := os.Getwd()
2797 require.NoError(t, err)
2798 expected := filepath.Join(cwd, "bar") + "\n"
2799 assert.Equal(t, expected, buff.String())
2800}
2801
2802func TestSingleCmdDep(t *testing.T) {
2803 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…