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

Function TestIncludesMissingTaskfile

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

Source from the content-addressed store, hash-verified

1241}
1242
1243func TestIncludesMissingTaskfile(t *testing.T) {
1244 t.Parallel()
1245
1246 const dir = "testdata/includes_missing_taskfile"
1247
1248 var buff bytes.Buffer
1249 e := task.NewExecutor(
1250 task.WithDir(dir),
1251 task.WithStdout(&buff),
1252 task.WithStderr(&buff),
1253 task.WithSilent(true),
1254 )
1255
1256 err := e.Setup()
1257 require.Error(t, err)
1258 assert.Contains(t, err.Error(), "include must specify taskfile or dir")
1259 assert.NotContains(t, err.Error(), "include cycle detected")
1260}
1261
1262func TestIncludesEmptyMain(t *testing.T) {
1263 t.Parallel()

Callers

nothing calls this directly

Calls 2

SetupMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…