1
0
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:
Pete Davison
2022-11-02 14:27:15 +00:00
parent a990ffe53d
commit 5a08409a27
8 changed files with 60 additions and 0 deletions

View File

@@ -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",