mirror of
https://github.com/go-task/task.git
synced 2025-06-02 23:27:37 +02:00
fix: includes interpolation test
This commit is contained in:
parent
6b3f8e29bb
commit
6ecfb634d2
@ -1199,15 +1199,15 @@ func TestIncludesInterpolation(t *testing.T) {
|
||||
expectedErr bool
|
||||
expectedOutput string
|
||||
}{
|
||||
{"include", "include", false, "includes_interpolation\n"},
|
||||
{"include with dir", "include-with-dir", false, "included\n"},
|
||||
{"include", "include", false, "include\n"},
|
||||
{"include_with_dir", "include-with-dir", false, "included\n"},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
var buff bytes.Buffer
|
||||
e := task.Executor{
|
||||
Dir: dir,
|
||||
Dir: filepath.Join(dir, test.name),
|
||||
Stdout: &buff,
|
||||
Stderr: &buff,
|
||||
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}}'
|
Loading…
x
Reference in New Issue
Block a user