mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
add basic test for details
This commit is contained in:
15
task_test.go
15
task_test.go
@@ -553,3 +553,18 @@ func TestIncludesCallingRoot(t *testing.T) {
|
||||
}
|
||||
tt.Run(t)
|
||||
}
|
||||
|
||||
func TestDetails(t *testing.T) {
|
||||
const dir = "testdata/details"
|
||||
|
||||
var buff bytes.Buffer
|
||||
e := task.Executor{
|
||||
Dir: dir,
|
||||
Stdout: &buff,
|
||||
Stderr: &buff,
|
||||
Details: true,
|
||||
}
|
||||
assert.NoError(t, e.Setup())
|
||||
assert.Equal(t, e.Taskfile.Tasks["task-with-details"].Details, "This is a very long detailed description\nwith multiple lines\n")
|
||||
assert.Equal(t, e.Taskfile.Tasks["task-without-details"].Details, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user