mirror of
				https://github.com/go-task/task.git
				synced 2025-10-30 23:58:01 +02:00 
			
		
		
		
	fix: includes interpolation test
This commit is contained in:
		| @@ -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}}' | ||||
		Reference in New Issue
	
	Block a user