mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
feat: run default task in included file when task is omitted
This commit is contained in:
24
task_test.go
24
task_test.go
@@ -1107,6 +1107,30 @@ func TestInternalTask(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIncludesShadowedDefault(t *testing.T) {
|
||||
tt := fileContentTest{
|
||||
Dir: "testdata/includes_shadowed_default",
|
||||
Target: "included",
|
||||
TrimSpace: true,
|
||||
Files: map[string]string{
|
||||
"file.txt": "shadowed",
|
||||
},
|
||||
}
|
||||
tt.Run(t)
|
||||
}
|
||||
|
||||
func TestIncludesUnshadowedDefault(t *testing.T) {
|
||||
tt := fileContentTest{
|
||||
Dir: "testdata/includes_unshadowed_default",
|
||||
Target: "included",
|
||||
TrimSpace: true,
|
||||
Files: map[string]string{
|
||||
"file.txt": "included",
|
||||
},
|
||||
}
|
||||
tt.Run(t)
|
||||
}
|
||||
|
||||
func TestSupportedFileNames(t *testing.T) {
|
||||
fileNames := []string{
|
||||
"Taskfile.yml",
|
||||
|
||||
Reference in New Issue
Block a user