mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
changed cyclic dep detection
since interpolation can be used, detection should be a execution time, and not before now, to prevent infinite execution, there's a miximum of 100 calls per task closes #37
This commit is contained in:
12
task_test.go
12
task_test.go
@@ -199,3 +199,15 @@ func TestParams(t *testing.T) {
|
||||
assert.Equal(t, f.content, string(content))
|
||||
}
|
||||
}
|
||||
|
||||
func TestCyclicDep(t *testing.T) {
|
||||
const dir = "testdata/cyclic"
|
||||
|
||||
e := task.Executor{
|
||||
Dir: dir,
|
||||
Stdout: ioutil.Discard,
|
||||
Stderr: ioutil.Discard,
|
||||
}
|
||||
assert.NoError(t, e.ReadTaskfile())
|
||||
assert.IsType(t, &task.MaximumTaskCallExceededError{}, e.Run("task-1"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user