mirror of
https://github.com/go-task/task.git
synced 2025-08-08 22:36:57 +02:00
fix: includes interpolation test
This commit is contained in:
@ -1199,15 +1199,15 @@ func TestIncludesInterpolation(t *testing.T) {
|
|||||||
expectedErr bool
|
expectedErr bool
|
||||||
expectedOutput string
|
expectedOutput string
|
||||||
}{
|
}{
|
||||||
{"include", "include", false, "includes_interpolation\n"},
|
{"include", "include", false, "include\n"},
|
||||||
{"include with dir", "include-with-dir", false, "included\n"},
|
{"include_with_dir", "include-with-dir", false, "included\n"},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
t.Run(test.name, func(t *testing.T) {
|
t.Run(test.name, func(t *testing.T) {
|
||||||
var buff bytes.Buffer
|
var buff bytes.Buffer
|
||||||
e := task.Executor{
|
e := task.Executor{
|
||||||
Dir: dir,
|
Dir: filepath.Join(dir, test.name),
|
||||||
Stdout: &buff,
|
Stdout: &buff,
|
||||||
Stderr: &buff,
|
Stderr: &buff,
|
||||||
Silent: true,
|
Silent: true,
|
||||||
|
10
testdata/includes_interpolation/Taskfile.yml
vendored
10
testdata/includes_interpolation/Taskfile.yml
vendored
@ -1,10 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
vars:
|
|
||||||
MODULE_NAME: included
|
|
||||||
|
|
||||||
includes:
|
|
||||||
include: './{{.MODULE_NAME}}/Taskfile.yml'
|
|
||||||
include-with-dir:
|
|
||||||
taskfile: './{{.MODULE_NAME}}/Taskfile.yml'
|
|
||||||
dir: '{{.MODULE_NAME}}'
|
|
7
testdata/includes_interpolation/include/Taskfile.yml
vendored
Normal file
7
testdata/includes_interpolation/include/Taskfile.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
vars:
|
||||||
|
MODULE_NAME: included
|
||||||
|
|
||||||
|
includes:
|
||||||
|
include: '../{{.MODULE_NAME}}/Taskfile.yml'
|
9
testdata/includes_interpolation/include_with_dir/Taskfile.yml
vendored
Normal file
9
testdata/includes_interpolation/include_with_dir/Taskfile.yml
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
vars:
|
||||||
|
MODULE_NAME: included
|
||||||
|
|
||||||
|
includes:
|
||||||
|
include-with-dir:
|
||||||
|
taskfile: '../{{.MODULE_NAME}}/Taskfile.yml'
|
||||||
|
dir: '../{{.MODULE_NAME}}'
|
Reference in New Issue
Block a user