mirror of
https://github.com/go-task/task.git
synced 2026-06-28 07:04:33 +00:00
Fix panic for empty tasks
Closes #338 Closes #362 Co-authored-by: Bharath Kumar <shettybharath4@gmail.com>
This commit is contained in:
10
task_test.go
10
task_test.go
@@ -56,6 +56,16 @@ func (fct fileContentTest) Run(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestEmptyTask(t *testing.T) {
|
||||
e := &task.Executor{
|
||||
Dir: "testdata/empty_task",
|
||||
Stdout: ioutil.Discard,
|
||||
Stderr: ioutil.Discard,
|
||||
}
|
||||
assert.NoError(t, e.Setup(), "e.Setup()")
|
||||
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "default"}))
|
||||
}
|
||||
|
||||
func TestEnv(t *testing.T) {
|
||||
tt := fileContentTest{
|
||||
Dir: "testdata/env",
|
||||
|
||||
Reference in New Issue
Block a user