mirror of
https://github.com/go-task/task.git
synced 2025-06-25 00:47:04 +02:00
feat: loop over a matrix (#1767)
This commit is contained in:
15
task_test.go
15
task_test.go
@ -2374,6 +2374,10 @@ func TestForCmds(t *testing.T) {
|
||||
name: "loop-explicit",
|
||||
expectedOutput: "a\nb\nc\n",
|
||||
},
|
||||
{
|
||||
name: "loop-matrix",
|
||||
expectedOutput: "windows/amd64\nwindows/arm64\nlinux/amd64\nlinux/arm64\ndarwin/amd64\ndarwin/arm64\n",
|
||||
},
|
||||
{
|
||||
name: "loop-sources",
|
||||
expectedOutput: "bar\nfoo\n",
|
||||
@ -2431,6 +2435,17 @@ func TestForDeps(t *testing.T) {
|
||||
name: "loop-explicit",
|
||||
expectedOutputContains: []string{"a\n", "b\n", "c\n"},
|
||||
},
|
||||
{
|
||||
name: "loop-matrix",
|
||||
expectedOutputContains: []string{
|
||||
"windows/amd64\n",
|
||||
"windows/arm64\n",
|
||||
"linux/amd64\n",
|
||||
"linux/arm64\n",
|
||||
"darwin/amd64\n",
|
||||
"darwin/arm64\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "loop-sources",
|
||||
expectedOutputContains: []string{"bar\n", "foo\n"},
|
||||
|
Reference in New Issue
Block a user